<p>lynxis lazus has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9578">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sgsn: add TC_attach_no_imsi_response<br><br>Ignores Identity Request IMSI.<br><br>MS -> SGSN: Attach Request TMSI (unknown)<br>MS <- SGSN: Identity Request IMEI (optional)<br>MS -> SGSN: Identity Response IMEI (optional)<br>MS <- SGSN: Identity Request IMSI<br>MS -x SGSN: no response<br>MS <- SGSN: re-send: Identity Request IMSI 4x<br>MS <- SGSN: Attach Reject<br><br>Change-Id: I4f41d59cfe6b0168b5e0874082fd700b56a7f0da<br>---<br>M sgsn/SGSN_Tests.ttcn<br>1 file changed, 48 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/78/9578/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn</span><br><span>index c1d4cdf..9632718 100644</span><br><span>--- a/sgsn/SGSN_Tests.ttcn</span><br><span>+++ b/sgsn/SGSN_Tests.ttcn</span><br><span>@@ -1411,6 +1411,53 @@</span><br><span>       vc_conn.done;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Attempt an attach, but loose the Identification Request (IMSI) */</span><br><span style="color: hsl(120, 100%, 40%);">+private function f_TC_attach_no_imsi_response(charstring id) runs on BSSGP_ConnHdlr {</span><br><span style="color: hsl(120, 100%, 40%);">+   var integer count_req := 0;</span><br><span style="color: hsl(120, 100%, 40%);">+   var MobileL3_CommonIE_Types.MobileIdentityLV mi;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    /* set p_tmsi to use it in Attach Req via f_mi_get_lv() */</span><br><span style="color: hsl(120, 100%, 40%);">+    g_pars.p_tmsi := 'c0000035'O;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       BSSGP.send(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      alt {</span><br><span style="color: hsl(120, 100%, 40%);">+         [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                      /* break */</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+             [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        /* ignore ID REQ IMSI */</span><br><span style="color: hsl(120, 100%, 40%);">+                      count_req := count_req + 1;</span><br><span style="color: hsl(120, 100%, 40%);">+                   repeat;</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+             [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        mi := valueof(ts_MI_IMEI_LV(g_pars.imei));</span><br><span style="color: hsl(120, 100%, 40%);">+                    BSSGP.send(ts_GMM_ID_RESP(mi));</span><br><span style="color: hsl(120, 100%, 40%);">+                       repeat;</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (count_req != 5) {</span><br><span style="color: hsl(120, 100%, 40%);">+         setverdict(fail, "Did not received GMM ID Request Type IMSI 5 times!");</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     setverdict(pass);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+testcase TC_attach_no_imsi_response() runs on test_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+       /* MS -> SGSN: Attach Request TMSI (unknown)</span><br><span style="color: hsl(120, 100%, 40%);">+        * MS <- SGSN: Identity Request IMEI (optional)</span><br><span style="color: hsl(120, 100%, 40%);">+     * MS -> SGSN: Identity Response IMEI (optional)</span><br><span style="color: hsl(120, 100%, 40%);">+    * MS <- SGSN: Identity Request IMSI</span><br><span style="color: hsl(120, 100%, 40%);">+        * MS -x SGSN: no response</span><br><span style="color: hsl(120, 100%, 40%);">+     * MS <- SGSN: re-send: Identity Request IMSI 4x</span><br><span style="color: hsl(120, 100%, 40%);">+    * MS <- SGSN: Attach Reject</span><br><span style="color: hsl(120, 100%, 40%);">+        */</span><br><span style="color: hsl(120, 100%, 40%);">+   var BSSGP_ConnHdlr vc_conn;</span><br><span style="color: hsl(120, 100%, 40%);">+   f_init();</span><br><span style="color: hsl(120, 100%, 40%);">+     f_sleep(1.0);</span><br><span style="color: hsl(120, 100%, 40%);">+ vc_conn := f_start_handler(refers(f_TC_attach_no_imsi_response), testcasename(), g_gb[0], 35, 60.0);</span><br><span style="color: hsl(120, 100%, 40%);">+  vc_conn.done;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> control {</span><br><span>      execute( TC_attach() );</span><br><span>      execute( TC_attach_mnc3() );</span><br><span>@@ -1425,6 +1472,7 @@</span><br><span>         execute( TC_attach_accept_all() );</span><br><span>   execute( TC_attach_closed() );</span><br><span>       execute( TC_attach_no_imei_response() );</span><br><span style="color: hsl(120, 100%, 40%);">+      execute( TC_attach_no_imsi_response() );</span><br><span>     execute( TC_hlr_location_cancel_request_update(), 10.0 );</span><br><span>    execute( TC_hlr_location_cancel_request_withdraw(), 10.0 );</span><br><span>  execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 10.0 );</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9578">change 9578</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9578"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I4f41d59cfe6b0168b5e0874082fd700b56a7f0da </div>
<div style="display:none"> Gerrit-Change-Number: 9578 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>