summaryrefslogtreecommitdiffstats
path: root/sgsn
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-06-12 16:24:01 +0200
committerAlexander Couzens <lynxis@fe80.eu>2018-06-12 19:21:16 +0200
commit667dd7fa848fae6e2d1bf704768c60ddd6e764a1 (patch)
tree7b340ee8d39387f854721289f03a6e138e8e80a7 /sgsn
parent234c588b723672f63659618559b7a300a5b91a4d (diff)
sgsn: add TC_attach_no_imei_response
Ignores Identity Request IMEI. MS -> SGSN: Attach Request IMSI MS <- SGSN: Identity Request IMSI (optional) MS -> SGSN: Identity Response IMSI (optional) MS <- SGSN: Identity Request IMEI MS -x SGSN: no response MS <- SGSN: re-send: Identity Request IMEI 4x MS <- SGSN: Attach Reject Change-Id: Ie50c75e62e31e01c5b17969fb067664e44fd68a5
Diffstat (limited to 'sgsn')
-rw-r--r--sgsn/SGSN_Tests.ttcn45
1 files changed, 45 insertions, 0 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 46b7b74..c1d4cdf 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1367,6 +1367,50 @@ testcase TC_hlr_location_cancel_request_unknown_subscriber_update() runs on test
+/* Attempt an attach, but loose the Identification Request (IMEI) */
+private function f_TC_attach_no_imei_response(charstring id) runs on BSSGP_ConnHdlr {
+ var integer count_req := 0;
+ var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+
+ BSSGP.send(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
+
+ alt {
+ [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ /* break */
+ }
+ [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
+ mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+ BSSGP.send(ts_GMM_ID_RESP(mi));
+ repeat;
+ }
+ [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
+ /* ignore ID REQ IMEI */
+ count_req := count_req + 1;
+ repeat;
+ }
+ }
+ if (count_req != 5) {
+ setverdict(fail, "Did not received GMM ID Request Type IMEI 5 times!");
+ }
+ setverdict(pass);
+}
+
+testcase TC_attach_no_imei_response() runs on test_CT {
+ /* MS -> SGSN: Attach Request IMSI
+ * MS <- SGSN: Identity Request IMSI (optional)
+ * MS -> SGSN: Identity Response IMSI (optional)
+ * MS <- SGSN: Identity Request IMEI
+ * MS -x SGSN: no response
+ * MS <- SGSN: re-send: Identity Request IMEI 4x
+ * MS <- SGSN: Attach Reject
+ */
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_attach_no_imei_response), testcasename(), g_gb[0], 32, 60.0);
+ vc_conn.done;
+}
+
control {
execute( TC_attach() );
execute( TC_attach_mnc3() );
@@ -1380,6 +1424,7 @@ control {
execute( TC_attach_combined() );
execute( TC_attach_accept_all() );
execute( TC_attach_closed() );
+ execute( TC_attach_no_imei_response() );
execute( TC_hlr_location_cancel_request_update(), 10.0 );
execute( TC_hlr_location_cancel_request_withdraw(), 10.0 );
execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 10.0 );