aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-04-02 16:58:59 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-07 18:57:39 +0000
commit48264657082154fdd4ec32515398bd8002220fc6 (patch)
tree1d060b6e08d9845e3fda715a58e8c36313f327d8
parent0803d88d9aa6ff36896fbde218018db3bea61dc7 (diff)
vlr_sgs: start lu expiration timer on sgs eps detach
When the subscriber is detached from SGs services (but not from 2g services). Then the subscriber essentially becomes a regular 2g subscriber, which means thet the lu expiration timer needs to be started. Change-Id: If95c63706dc1c5a537f7cd1b6481252427cbf234 Related: OS#3614
-rw-r--r--src/libvlr/vlr_sgs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libvlr/vlr_sgs.c b/src/libvlr/vlr_sgs.c
index 538c9f28f..06737db46 100644
--- a/src/libvlr/vlr_sgs.c
+++ b/src/libvlr/vlr_sgs.c
@@ -101,6 +101,11 @@ int vlr_sgs_loc_update(struct vlr_instance *vlr, struct vlr_sgs_cfg *cfg,
vsub->cgi.lai = *new_lai;
vsub->cs.lac = vsub->sgs.lai.lac;
+ /* Subscribers that are created by the SGs location update will not
+ * expire automatically, however a 2G LU or an implicit IMSI detach
+ * from EPS services may change this. */
+ vsub->expire_lu = VLR_SUBSCRIBER_NO_EXPIRATION;
+
return 0;
}
@@ -197,6 +202,15 @@ void vlr_sgs_eps_detach(struct vlr_instance *vlr, const char *imsi, enum sgsap_i
}
osmo_fsm_inst_dispatch(vsub->sgs_fsm, evt, NULL);
+
+ /* See also 3GPP TS 29.118, 5.4.3 Procedures in the VLR. Detaching from
+ * EPS services essentially means that the subscriber leaves the 4G RAN
+ * but continues to live on 2G, this basically turns the subscriber into
+ * a normal 2G subscriber and we need to make sure that the lu-
+ * expiration timer is running. */
+ if (vsub->expire_lu == VLR_SUBSCRIBER_NO_EXPIRATION)
+ vlr_subscr_enable_expire_lu(vsub);
+
vlr_subscr_put(vsub);
}