vlr_sgs: fix SGs IMSI detech from non EPS services
When the subscriber is detached from non EPS services while the SGs-association is not SGs-NULL, it needs to be removed from the VLR database. Change-Id: I575cf6036ad39468f590b2d57a06cd3512a4c31c Related: OS#3614
This commit is contained in:
parent
6c766c6464
commit
0803d88d9a
|
@ -131,10 +131,17 @@ void vlr_sgs_imsi_detach(struct vlr_instance *vlr, const char *imsi, enum sgsap_
|
||||||
{
|
{
|
||||||
struct vlr_subscr *vsub;
|
struct vlr_subscr *vsub;
|
||||||
enum sgs_ue_fsm_event evt;
|
enum sgs_ue_fsm_event evt;
|
||||||
|
|
||||||
vsub = vlr_subscr_find_by_imsi(vlr, imsi);
|
vsub = vlr_subscr_find_by_imsi(vlr, imsi);
|
||||||
if (!vsub)
|
if (!vsub)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* See also: 3GPP TS 29.118, 5.6.3 Procedures in the VLR: In case of
|
||||||
|
* an implicit detach, we are supposed to check if the state of the
|
||||||
|
* SGs-association, and only when it is not SGs-NULL, we may proceed. */
|
||||||
|
if (vsub->sgs_fsm->state == SGS_UE_ST_NULL && type == SGSAP_ID_NONEPS_T_IMPLICIT_UE_EPS_NONEPS)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SGSAP_ID_NONEPS_T_EXPLICIT_UE_NONEPS:
|
case SGSAP_ID_NONEPS_T_EXPLICIT_UE_NONEPS:
|
||||||
evt = SGS_UE_E_RX_DETACH_IND_FROM_UE;
|
evt = SGS_UE_E_RX_DETACH_IND_FROM_UE;
|
||||||
|
@ -153,6 +160,11 @@ void vlr_sgs_imsi_detach(struct vlr_instance *vlr, const char *imsi, enum sgsap_
|
||||||
|
|
||||||
osmo_fsm_inst_dispatch(vsub->sgs_fsm, evt, NULL);
|
osmo_fsm_inst_dispatch(vsub->sgs_fsm, evt, NULL);
|
||||||
vlr_subscr_put(vsub);
|
vlr_subscr_put(vsub);
|
||||||
|
|
||||||
|
/* Detaching from non EPS services essentially means that the
|
||||||
|
* subscriber is detached from 2G. In any case the VLR will
|
||||||
|
* get rid of the subscriber. */
|
||||||
|
vlr_subscr_expire(vsub);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Perform an SGs EPS detach.
|
/*! Perform an SGs EPS detach.
|
||||||
|
|
Loading…
Reference in New Issue