Change in osmo-msc[master]: vlr_sgs: start lu expiration timer on sgs eps detach

Harald Welte gerrit-no-reply at
Sun Apr 7 18:57:40 UTC 2019

Harald Welte has submitted this change and it was merged. ( )

Change subject: vlr_sgs: start lu expiration timer on sgs eps detach

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

Change-Id: If95c63706dc1c5a537f7cd1b6481252427cbf234
Related: OS#3614
M src/libvlr/vlr_sgs.c
1 file changed, 14 insertions(+), 0 deletions(-)

  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Jenkins Builder: Verified

diff --git a/src/libvlr/vlr_sgs.c b/src/libvlr/vlr_sgs.c
index 538c9f2..06737db 100644
--- a/src/libvlr/vlr_sgs.c
+++ b/src/libvlr/vlr_sgs.c
@@ -101,6 +101,11 @@
 	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. */
 	return 0;
@@ -197,6 +202,15 @@
 	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);

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If95c63706dc1c5a537f7cd1b6481252427cbf234
Gerrit-Change-Number: 13494
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at>
Gerrit-Reviewer: Harald Welte <laforge at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list