lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/43480?usp=email )
Change subject: libvlr: auth: never re-use auth tuples for authentication ......................................................................
libvlr: auth: never re-use auth tuples for authentication
The auth tuples should only ever sent once over the air for authentication. Later the auth tuples may be re-used multiple times for ciphering, but can't be re-used other the air for authentication.
Change-Id: I5c628ef4b43f7c22f62d1405cbe1f717a7918548 --- M src/libvlr/vlr_auth_fsm.c 1 file changed, 5 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/43480/1
diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index b3bd236..68c9a54 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -119,12 +119,11 @@ return at; }
-/* Return an auth tuple and increment its use count. */ +/* Return an auth tuple */ static struct vlr_auth_tuple * -vlr_subscr_get_auth_tuple(struct vlr_subscr *vsub, int max_reuse_count) +vlr_subscr_get_auth_tuple(struct vlr_subscr *vsub) { - struct vlr_auth_tuple *at = _vlr_subscr_next_auth_tuple(vsub, - max_reuse_count); + struct vlr_auth_tuple *at = _vlr_subscr_next_auth_tuple(vsub, 0); if (!at) return NULL; at->use_count++; @@ -311,7 +310,7 @@ bool use_umts_aka;
/* Caller ensures we have vectors available */ - at = vlr_subscr_get_auth_tuple(vsub, afp->auth_tuple_max_reuse_count); + at = vlr_subscr_get_auth_tuple(vsub); if (!at) { LOGPFSML(fi, LOGL_ERROR, "A previous check ensured that an" " auth tuple was available, but now there is in fact" @@ -350,7 +349,7 @@ afp->auth_tuple_max_reuse_count = vsub->vlr->cfg.auth_tuple_max_reuse_count;
/* Check if we have vectors available */ - if (!vlr_subscr_has_auth_tuple(vsub, afp->auth_tuple_max_reuse_count)) { + if (!vlr_subscr_has_auth_tuple(vsub, 0)) { /* Obtain_Authentication_Sets_VLR */ int rc = vlr_subscr_req_sai(vsub, NULL, NULL); if (rc < 0)