gsm_04_08: Specify key_seq when calling gsm48_tx_mm_auth_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index cd66d25..e09928f 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1175,7 +1175,7 @@
}
/* Section 9.2.2 */
-int gsm48_tx_mm_auth_req(struct gsm_lchan *lchan, u_int8_t *rand)
+int gsm48_tx_mm_auth_req(struct gsm_lchan *lchan, u_int8_t *rand, int key_seq)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
@@ -1187,8 +1187,7 @@
gh->proto_discr = GSM48_PDISC_MM;
gh->msg_type = GSM48_MT_MM_AUTH_REQ;
- /* Key Sequence: FIXME fixed to 0 */
- ar->key_seq = 0;
+ ar->key_seq = key_seq;
/* 16 bytes RAND parameters */
if (rand)
diff --git a/openbsc/src/token_auth.c b/openbsc/src/token_auth.c
index f6be0bc..fd81f03 100644
--- a/openbsc/src/token_auth.c
+++ b/openbsc/src/token_auth.c
@@ -103,7 +103,7 @@
if (lchan) {
u_int8_t auth_rand[16];
/* kick the subscriber off the network */
- gsm48_tx_mm_auth_req(lchan, auth_rand);
+ gsm48_tx_mm_auth_req(lchan, auth_rand, 0);
gsm48_tx_mm_auth_rej(lchan);
/* FIXME: close the channel early ?*/
//gsm48_send_rr_Release(lchan);
@@ -139,7 +139,7 @@
lchan = lchan_for_subscr(sms->receiver);
if (lchan) {
/* kick the subscriber off the network */
- gsm48_tx_mm_auth_req(lchan, auth_rand);
+ gsm48_tx_mm_auth_req(lchan, auth_rand, 0);
gsm48_tx_mm_auth_rej(lchan);
/* FIXME: close the channel early ?*/
//gsm48_send_rr_Release(lchan);