lynxis lazus submitted this change.

View Change



13 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: laforge: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve
SGSN: add TC_attach_gmm_attach_req_while_gmm_attach_retransmit

Extend the TC_attach_gmm_attach_req_while_gmm_attach
by "losing" an ID Req message.

Change-Id: I8d208c0a98675238dba439ab3e75758293928588
---
M sgsn/SGSN_Tests.ttcn
M sgsn/expected-results.xml
2 files changed, 76 insertions(+), 1 deletion(-)

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 7f1b3d1..8f8af8e 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2098,7 +2098,6 @@
f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
f_send_l3(ts_GMM_ATTACH_COMPL);
setverdict(pass);
- /* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */
}
}
}
@@ -2125,6 +2124,80 @@
f_cleanup();
}

+/* The main difference to f_TC_attach_gmm_attach_req_while_gmm_attach is the *lost* ID Req (only first) */
+private function f_TC_attach_gmm_attach_req_while_gmm_attach_retransmit(charstring id) runs on BSSGP_ConnHdlr {
+ var integer count_req := 0;
+ var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+ var RoutingAreaIdentificationV rand_rai := f_random_RAI();
+ var PDU_L3_SGSN_MS l3_mt;
+
+ g_pars.vec := f_gen_auth_vec_3g();
+ g_pars.p_tmsi := f_random_ptmsi(suffix := '01'O);
+
+ f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));
+
+ alt {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
+ setverdict(fail, "Unexpected GMM ATTACH REJECT");
+ mtc.stop;
+ }
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) {
+ /* Simulate a lost packet, because GMM Attach Req is sent with same content */
+ f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));
+ }
+ }
+
+ alt {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
+ setverdict(fail, "Unexpected GMM ATTACH REJECT");
+ mtc.stop;
+ }
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) {
+ mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+ f_send_l3(ts_GMM_ID_RESP(mi));
+ repeat;
+ }
+ [] as_gmm_auth(umts_aka_challenge := true, expect_sai := true) {};
+ }
+ f_sleep(1.0);
+
+ alt {
+ [] as_gmm_gsup_lu_isd() { repeat; };
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
+ setverdict(fail, "Unexpected GMM ATTACH REJECT");
+ mtc.stop;
+ }
+ [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
+ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
+ f_send_l3(ts_GMM_ATTACH_COMPL);
+ setverdict(pass);
+ }
+ }
+}
+
+testcase TC_attach_gmm_attach_req_while_gmm_attach_retransmit() runs on test_CT {
+ /* Testing if the SGSN ignore Attach Request with the exact same content */
+ /* MS -> SGSN: Attach Request TMSI
+ * MS <- SGSN: Identity Request IMSI
+ * MS -> SGSN: Attach Request (2nd)
+ * MS <- SGSN: Identity Request IMSI (retrans)
+ * SGSN -> HLR: SAI Request
+ * SGSN <- HLR: SAI Response
+ * MS <- SGSN: Auth Req
+ * MS <- SGSN: Auth Resp
+ * SGSN <-> HLR: ULA/ISD
+ * MS <- SGSN: Attach Accept
+ * MS -> SGSN: Attach Complete
+ */
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_attach_gmm_attach_req_while_gmm_attach_retransmit), testcasename(), g_gb, 39);
+ vc_conn.done;
+ f_cleanup();
+}
+
+
private function f_TC_attach_usim_resync(charstring id) runs on BSSGP_ConnHdlr {
var RoutingAreaIdentificationV old_ra := f_random_RAI();

@@ -3422,6 +3495,7 @@
execute( TC_attach_pdp_act_user_error_ind_ggsn() );
execute( TC_attach_pdp_act_gmm_detach() );
execute( TC_attach_gmm_attach_req_while_gmm_attach() );
+ execute( TC_attach_gmm_attach_req_while_gmm_attach_retransmit() );

execute( TC_xid_empty_l3() );
execute( TC_xid_n201u() );
diff --git a/sgsn/expected-results.xml b/sgsn/expected-results.xml
index e2e099b..b0069aa 100644
--- a/sgsn/expected-results.xml
+++ b/sgsn/expected-results.xml
@@ -70,6 +70,7 @@
<testcase classname='SGSN_Tests' name='TC_attach_pdp_act_user_error_ind_ggsn' time='MASKED'/>
<testcase classname='SGSN_Tests' name='TC_attach_pdp_act_gmm_detach' time='MASKED'/>
<testcase classname='SGSN_Tests' name='TC_attach_gmm_attach_req_while_gmm_attach' time='MASKED'/>
+ <testcase classname='SGSN_Tests' name='TC_attach_gmm_attach_req_while_gmm_attach_retransmit' time='MASKED'/>
<testcase classname='SGSN_Tests' name='TC_xid_empty_l3' time='MASKED'/>
<testcase classname='SGSN_Tests' name='TC_xid_n201u' time='MASKED'/>
<testcase classname='SGSN_Tests' name='TC_llc_null' time='MASKED'/>

To view, visit change 39255. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8d208c0a98675238dba439ab3e75758293928588
Gerrit-Change-Number: 39255
Gerrit-PatchSet: 16
Gerrit-Owner: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>