auth: add OSMO_MILENAGE_IND_BITLEN_MAX

Will be used by OsmoHLR to validate VTY and CTRL input.

Change-Id: Ic39f3404d1a49ffd06070aa9897b36f219eacf4d
This commit is contained in:
Neels Hofmeyr 2017-10-07 04:44:08 +02:00
parent 26e30b1309
commit 1a02e36c4c
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@
#include <osmocom/core/utils.h>
#define OSMO_A5_MAX_KEY_LEN_BYTES (128/8)
#define OSMO_MILENAGE_IND_BITLEN_MAX 28
/*! Authentication Type (GSM/UMTS) */
enum osmo_sub_auth_type {

View File

@ -112,7 +112,7 @@ static int milenage_gen_vec(struct osmo_auth_vector *vec,
* { .ind_bitlen = 0, .ind = 0, .sqn = (desired_sqn - 1) }
*/
if (aud->u.umts.ind_bitlen > 28)
if (aud->u.umts.ind_bitlen > OSMO_MILENAGE_IND_BITLEN_MAX)
return -2;
seq_1 = 1LL << aud->u.umts.ind_bitlen;