diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2010-06-10 23:51:41 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-06-14 20:43:52 +0200 |
commit | c593cf100abeae7c795ccb568be68384081b9824 (patch) | |
tree | f9b15185fc1ae34aa14cbd1f89b25b2a0026c90e | |
parent | 0c873a06b6bc9b05d6a54a22246c70f89944b634 (diff) |
gsm_04_08: Improve gsm48_rx_mm_auth_resp debug in failure case
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r-- | openbsc/src/gsm_04_08.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index 562c24d43..2ce2d15ff 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -886,7 +886,7 @@ static int gsm48_rx_mm_auth_resp(struct msgb *msg) struct gsm_subscriber_connection *conn = &msg->lchan->conn; struct gsm_network *net = lchan->ts->trx->bts->network; - DEBUGP(DMM, "MM AUTHENTICATION RESPONSE (sres = %s)\n", + DEBUGP(DMM, "MM AUTHENTICATION RESPONSE (sres = %s): ", hexdump(ar->sres, 4)); /* Safety check */ @@ -898,6 +898,10 @@ static int gsm48_rx_mm_auth_resp(struct msgb *msg) /* Validate SRES */ if (memcmp(conn->sec_operation->atuple.sres, ar->sres,4)) { gsm_cbfn *cb = conn->sec_operation->cb; + + DEBUGPC(DMM, "Invalid (expected %s)\n", + hexdump(conn->sec_operation->atuple.sres, 4)); + if (cb) cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_AUTH_FAILED, NULL, lchan, conn->sec_operation->cb_data); @@ -906,6 +910,8 @@ static int gsm48_rx_mm_auth_resp(struct msgb *msg) return gsm48_tx_mm_auth_rej(lchan); } + DEBUGPC(DMM, "OK\n"); + /* Start ciphering */ lchan->encr.alg_id = RSL_ENC_ALG_A5(net->a5_encryption); lchan->encr.key_len = 8; |