libvlr/vlr.c: do not expire subscribers if periodic LU is disabled

When periodic Location Update is disabled (T3212 = 0), it was noticed
that OsmoMSC does expire subscribers quite soon - after 60 seconds
(VLR_SUBSCRIBER_LU_EXPIRATION_INTERVAL) since the last LU.

In order to avoid that, we need to check T3212 timer value in
vlr_subscr_expire_lu(), and if it's equal to 0, do not expire
anybody until the explicit IMSI Detach.

Change-Id: I2ead2241a3394dbdd5417f4554190df3fd698af2
This commit is contained in:
Vadim Yanitskiy 2019-06-19 03:13:40 +07:00
parent 188dd5f4df
commit 718f32fa88
1 changed files with 7 additions and 0 deletions

View File

@ -519,8 +519,15 @@ void vlr_subscr_expire_lu(void *data)
{
struct vlr_instance *vlr = data;
struct vlr_subscr *vsub, *vsub_tmp;
struct gsm_network *net;
struct timespec now;
/* Periodic location update might be disabled from the VTY,
* so we shall not expire subscribers until explicit IMSI Detach. */
net = vlr->user_ctx; /* XXX move t3212 into struct vlr_instance? */
if (!net->t3212)
goto done;
if (llist_empty(&vlr->subscribers))
goto done;