<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/23497">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gmm: Expect E_VLR_ANSWERED when in ST_IU_SECURITY_CMD<br><br>GSUP message is sent immediately before moving onto state<br>ST_IU_SECURITY_CMD, so it's expected to receive a response for it, which<br>will trigger event E_VLR_ANSWERED being sent.<br>See following log showing the scenario:<br><br>"""<br>GMM_ATTACH_REQ_FSM(gb_gmm_req)[0x8137b88]{Authenticate}: Received Event E_AUTH_RESP_RECV_SUCCESS<br>MM(001010123456789/f8bab3dc) Requesting authorization<br>MM(001010123456789/f8bab3dc) Missing information, requesting subscriber data<br>MM(001010123456789/f8bab3dc) Requesting subscriber data update<br>SUBSCR(001010123456789) subscriber data is not available<br>SUBSCR(001010123456789) Sending GSUP, will send: 04 01 08 00 01 01 21 43 65 60 f3 28 01 01<br>GMM_ATTACH_REQ_FSM(gb_gmm_req)[0x8137b88]{Authenticate}: state_chg to IuSecurityCommand<br>SUBSCR(001010123456789) Received GSUP message OSMO_GSUP_MSGT_INSERT_DATA_REQUEST<br>SUBSCR(001010123456789) Will set PDP info, context id = 1, APN = 01 2a<br>SUBSCR(001010123456789) Updating subscriber data<br>MM(001010123456789/f8bab3dc) Subscriber data update<br>MM(001010123456789/f8bab3dc) Updating authorization (authenticate -> accepted)<br>MM(001010123456789/f8bab3dc) Got authorization update: state authenticate -> accepted<br>MM(001010123456789/f8bab3dc) Authorized, continuing procedure, IMSI=001010123456789<br>GMM_ATTACH_REQ_FSM(gb_gmm_req)[0x8137b88]{IuSecurityCommand}: Received Event E_VLR_ANSWERED<br>GMM_ATTACH_REQ_FSM(gb_gmm_req)[0x8137b88]{IuSecurityCommand}: Event E_VLR_ANSWERED not permitted<br>SUBSCR(001010123456789) Sending GSUP, will send: 12 01 08 00 01 01 21 43 65 60 f3 28 01 01<br>SUBSCR(001010123456789) Received GSUP message OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT<br>SUBSCR(001010123456789) Updating subscriber data<br>MM(001010123456789/f8bab3dc) Subscriber data update<br>MM(001010123456789/f8bab3dc) Updating authorization (accepted -> accepted)<br>sccp_sap_up(N-DATA.indication)<br>N-DATA.ind(2, 20 06 00 08 00 00 01 00 06 00 01 00 )<br>handle_co(dir=2, proc=6)<br>Transmitting RANAP CommonID (SCCP conn_id 2)<br>GMM_ATTACH_REQ_FSM(gb_gmm_req)[0x8137b88]{IuSecurityCommand}: Received Event E_IU_SECURITY_CMD_COMPLETE<br>GMM_ATTACH_REQ_FSM(gb_gmm_req)[0x8137b88]{IuSecurityCommand}: state_chg to WaitAttachComplete<br>"""<br><br>Related: SYS#5389<br>Change-Id: If348ff32faa4a709b59ee1b9b043883a7d46cf93<br>---<br>M src/sgsn/gprs_gmm_attach.c<br>1 file changed, 8 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/97/23497/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/sgsn/gprs_gmm_attach.c b/src/sgsn/gprs_gmm_attach.c</span><br><span>index c903a01..629cc53 100644</span><br><span>--- a/src/sgsn/gprs_gmm_attach.c</span><br><span>+++ b/src/sgsn/gprs_gmm_attach.c</span><br><span>@@ -272,6 +272,13 @@</span><br><span> static void st_iu_security_cmd(struct osmo_fsm_inst *fi, uint32_t event, void *data)</span><br><span> {</span><br><span>    switch(event) {</span><br><span style="color: hsl(120, 100%, 40%);">+       case E_VLR_ANSWERED:</span><br><span style="color: hsl(120, 100%, 40%);">+          /* We may receive an event due to rx</span><br><span style="color: hsl(120, 100%, 40%);">+           * OSMO_GSUP_MSGT_INSERT_DATA_REQUEST here. Do nothing, update of</span><br><span style="color: hsl(120, 100%, 40%);">+              * subscriber is done by lower layers before event is signalled.</span><br><span style="color: hsl(120, 100%, 40%);">+               * In this state we simply wait for E_IU_SECURITY_CMD_COMPLETE</span><br><span style="color: hsl(120, 100%, 40%);">+                 */</span><br><span style="color: hsl(120, 100%, 40%);">+           break;</span><br><span>       case E_IU_SECURITY_CMD_COMPLETE:</span><br><span>             gmm_attach_fsm_state_chg(fi, ST_ACCEPT);</span><br><span>             break;</span><br><span>@@ -308,7 +315,7 @@</span><br><span>                 .action = st_auth,</span><br><span>   },</span><br><span>   [ST_IU_SECURITY_CMD] = {</span><br><span style="color: hsl(0, 100%, 40%);">-                .in_event_mask = X(E_IU_SECURITY_CMD_COMPLETE),</span><br><span style="color: hsl(120, 100%, 40%);">+               .in_event_mask = X(E_IU_SECURITY_CMD_COMPLETE) | X(E_VLR_ANSWERED),</span><br><span>          .out_state_mask = X(ST_INIT) | X(ST_AUTH) | X(ST_ACCEPT) | X(ST_REJECT),</span><br><span>             .name = "IuSecurityCommand",</span><br><span>               .onenter = st_iu_security_cmd_on_enter,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/23497">change 23497</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/c/osmo-sgsn/+/23497"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If348ff32faa4a709b59ee1b9b043883a7d46cf93 </div>
<div style="display:none"> Gerrit-Change-Number: 23497 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>