aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libvlr
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-04 21:09:12 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-09 17:10:20 +0100
commitca72056ea1e226acb75e14e4d1158615ac18b5d4 (patch)
tree2438e7c25d547860c3368e9e7651ddf0a944b881 /openbsc/src/libvlr
parentc9a8c3892a6bdf88ec251927ff5b955d9bf6cfa5 (diff)
fix: vlr: clear last_tuple when receiving auth tuples
When receiving more than one auth tuple during AUTS resync, the VLR would go on to send the second tuple instead of the first. The unit test didn't catch that because its fake HLR message contained only one tuple. Adjust the test to send two tuples to catch this error. Fix the code to clear vlr_subscr->last_tuple whenever new auth tuples are received. Change-Id: I1f84e7d2619aa8d9a0dcdfb50745feeb040264b9
Diffstat (limited to 'openbsc/src/libvlr')
-rw-r--r--openbsc/src/libvlr/vlr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/libvlr/vlr.c b/openbsc/src/libvlr/vlr.c
index db874f298..a8404b246 100644
--- a/openbsc/src/libvlr/vlr.c
+++ b/openbsc/src/libvlr/vlr.c
@@ -568,6 +568,9 @@ void vlr_subscr_update_tuples(struct vlr_subscr *vsub,
/* FIXME what now? */
// vlr_subscr_cancel(vsub, GMM_CAUSE_GSM_AUTH_UNACCEPT); ?
}
+
+ /* New tuples means last_tuple becomes invalid */
+ vsub->last_tuple = NULL;
}
/* Handle SendAuthInfo Result/Error from HLR */