diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2009-09-27 11:10:17 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-09-27 11:10:17 +0200 |
commit | 849f554c87174ea465c18b93104f67fb516c0c2f (patch) | |
tree | f683b68185817c2964c765c0330266dcde98528b /openbsc/src/gsm_04_08.c | |
parent | 59d284e8cf210bb6976177310f0293db65b561ac (diff) |
[gsm_04_08] Fix gsm48_tx_mm_auth_req implementation
It was mainly missing the key_seq field, causing the
command to just be rejected by the ME.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'openbsc/src/gsm_04_08.c')
-rw-r--r-- | openbsc/src/gsm_04_08.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index b3f287822..dc8567077 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -1233,7 +1233,7 @@ int gsm48_tx_mm_auth_req(struct gsm_lchan *lchan, u_int8_t *rand) { struct msgb *msg = gsm48_msgb_alloc(); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); - u_int8_t *r; + struct gsm48_auth_req *ar = (struct gsm48_auth_req *) msgb_put(msg, sizeof(*ar)); DEBUGP(DMM, "-> AUTH REQ\n"); @@ -1241,10 +1241,12 @@ int gsm48_tx_mm_auth_req(struct gsm_lchan *lchan, u_int8_t *rand) gh->proto_discr = GSM48_PDISC_MM; gh->msg_type = GSM48_MT_MM_AUTH_REQ; + /* Key Sequence: FIXME fixed to 0 */ + ar->key_seq = 0; + /* 16 bytes RAND parameters */ - r = msgb_put(msg, 16); if (rand) - memcpy(r, rand, 16); + memcpy(ar->rand, rand, 16); return gsm48_sendmsg(msg, NULL); } |