aboutsummaryrefslogtreecommitdiffstats
path: root/src/libvlr/vlr_auth_fsm.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-11-30 02:57:33 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-11-30 22:46:15 +0100
commit8b6e536007815a0337fbae70917702c8e06b4bb5 (patch)
tree90e2d7cba504d7c60b29874e0ec17def5a20f823 /src/libvlr/vlr_auth_fsm.c
parentdf6d2e3838f9f47e36541fdfa7b88c6fdb0c8e6f (diff)
move gsm_auth_tuple to vlr.h as vlr_auth_tuple
Along goes GSM_KEYSEQ_INVAL as VLR_*. It's where it logically belongs, and is almost the only reason why vlr.h includes gsm_data.h. The remaining reason, GSM_EXTENSION_LENGTH, will be moved by upcoming patch. Change-Id: I122feae7ee3cbc59e941daef35a954bce29fec76
Diffstat (limited to 'src/libvlr/vlr_auth_fsm.c')
-rw-r--r--src/libvlr/vlr_auth_fsm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c
index d5a8555b7..84196965e 100644
--- a/src/libvlr/vlr_auth_fsm.c
+++ b/src/libvlr/vlr_auth_fsm.c
@@ -65,13 +65,13 @@ struct auth_fsm_priv {
* least used auth tuple without enforcing a maximum use count. If there are
* no auth tuples, return NULL.
*/
-static struct gsm_auth_tuple *
+static struct vlr_auth_tuple *
_vlr_subscr_next_auth_tuple(struct vlr_subscr *vsub, int max_reuse_count)
{
unsigned int count;
unsigned int idx;
- struct gsm_auth_tuple *at = NULL;
- unsigned int key_seq = GSM_KEY_SEQ_INVAL;
+ struct vlr_auth_tuple *at = NULL;
+ unsigned int key_seq = VLR_KEY_SEQ_INVAL;
if (!vsub)
return NULL;
@@ -79,7 +79,7 @@ _vlr_subscr_next_auth_tuple(struct vlr_subscr *vsub, int max_reuse_count)
if (vsub->last_tuple)
key_seq = vsub->last_tuple->key_seq;
- if (key_seq == GSM_KEY_SEQ_INVAL)
+ if (key_seq == VLR_KEY_SEQ_INVAL)
/* Start with 0 after increment modulo array size */
idx = ARRAY_SIZE(vsub->auth_tuples) - 1;
else
@@ -88,7 +88,7 @@ _vlr_subscr_next_auth_tuple(struct vlr_subscr *vsub, int max_reuse_count)
for (count = ARRAY_SIZE(vsub->auth_tuples); count > 0; count--) {
idx = (idx + 1) % ARRAY_SIZE(vsub->auth_tuples);
- if (vsub->auth_tuples[idx].key_seq == GSM_KEY_SEQ_INVAL)
+ if (vsub->auth_tuples[idx].key_seq == VLR_KEY_SEQ_INVAL)
continue;
if (!at || vsub->auth_tuples[idx].use_count < at->use_count)
@@ -102,10 +102,10 @@ _vlr_subscr_next_auth_tuple(struct vlr_subscr *vsub, int max_reuse_count)
}
/* Return an auth tuple and increment its use count. */
-static struct gsm_auth_tuple *
+static struct vlr_auth_tuple *
vlr_subscr_get_auth_tuple(struct vlr_subscr *vsub, int max_reuse_count)
{
- struct gsm_auth_tuple *at = _vlr_subscr_next_auth_tuple(vsub,
+ struct vlr_auth_tuple *at = _vlr_subscr_next_auth_tuple(vsub,
max_reuse_count);
if (!at)
return NULL;
@@ -124,7 +124,7 @@ static bool check_auth_resp(struct vlr_subscr *vsub, bool is_r99,
bool is_utran, const uint8_t *res,
uint8_t res_len)
{
- struct gsm_auth_tuple *at = vsub->last_tuple;
+ struct vlr_auth_tuple *at = vsub->last_tuple;
struct osmo_auth_vector *vec = &at->vec;
bool check_umts;
bool res_is_umts_aka;
@@ -263,7 +263,7 @@ static int _vlr_subscr_authenticate(struct osmo_fsm_inst *fi)
{
struct auth_fsm_priv *afp = fi->priv;
struct vlr_subscr *vsub = afp->vsub;
- struct gsm_auth_tuple *at;
+ struct vlr_auth_tuple *at;
bool use_umts_aka;
/* Caller ensures we have vectors available */