<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13493">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vlr_sgs: fix SGs IMSI detech from non EPS services<br><br>When the subscriber is detached from non EPS services while the<br>SGs-association is not SGs-NULL, it needs to be removed from the VLR<br>database.<br><br>Change-Id: I575cf6036ad39468f590b2d57a06cd3512a4c31c<br>Related: OS#3614<br>---<br>M src/libvlr/vlr_sgs.c<br>1 file changed, 12 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/13493/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libvlr/vlr_sgs.c b/src/libvlr/vlr_sgs.c</span><br><span>index 8614892..538c9f2 100644</span><br><span>--- a/src/libvlr/vlr_sgs.c</span><br><span>+++ b/src/libvlr/vlr_sgs.c</span><br><span>@@ -131,10 +131,17 @@</span><br><span> {</span><br><span>       struct vlr_subscr *vsub;</span><br><span>     enum sgs_ue_fsm_event evt;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         vsub = vlr_subscr_find_by_imsi(vlr, imsi);</span><br><span>   if (!vsub)</span><br><span>           return;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   /* See also: 3GPP TS 29.118, 5.6.3 Procedures in the VLR: In case of</span><br><span style="color: hsl(120, 100%, 40%);">+   * an implicit detach, we are supposed to check if the state of the</span><br><span style="color: hsl(120, 100%, 40%);">+    * SGs-association, and only when it is not SGs-NULL, we may proceed. */</span><br><span style="color: hsl(120, 100%, 40%);">+      if (vsub->sgs_fsm->state == SGS_UE_ST_NULL && type == SGSAP_ID_NONEPS_T_IMPLICIT_UE_EPS_NONEPS)</span><br><span style="color: hsl(120, 100%, 40%);">+         return;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    switch (type) {</span><br><span>      case SGSAP_ID_NONEPS_T_EXPLICIT_UE_NONEPS:</span><br><span>           evt = SGS_UE_E_RX_DETACH_IND_FROM_UE;</span><br><span>@@ -153,6 +160,11 @@</span><br><span> </span><br><span>     osmo_fsm_inst_dispatch(vsub->sgs_fsm, evt, NULL);</span><br><span>         vlr_subscr_put(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Detaching from non EPS services essentially means that the</span><br><span style="color: hsl(120, 100%, 40%);">+  * subscriber is detached from 2G. In any case the VLR will</span><br><span style="color: hsl(120, 100%, 40%);">+    * get rid of the subscriber. */</span><br><span style="color: hsl(120, 100%, 40%);">+      vlr_subscr_expire(vsub);</span><br><span> }</span><br><span> </span><br><span> /*! Perform an SGs EPS detach.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13493">change 13493</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/13493"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I575cf6036ad39468f590b2d57a06cd3512a4c31c </div>
<div style="display:none"> Gerrit-Change-Number: 13493 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>