aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msc_vlr
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-03-10 00:25:20 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-03-10 22:23:13 +0100
commit11d2ce3e341ba893fa012a6949279428a745c09d (patch)
treee9c3bbcbde70dbafc97eda975b51134baf6223e5 /tests/msc_vlr
parent31adcae654595c52d61ca8ca0c53353a70325930 (diff)
cosmetic: vlr_auth_fsm: clarify decision on UMTS AKA or GSM AKA
The code deciding on whether UMTS AKA is used was cascaded and convoluted. By flattening the decisions, they become easier to read and possibly catch more weird corner cases / log information more clearly. - First decide what AKA the RES length reflects. - Then decide whether all prerequisites for UMTS AKA are satisfied. - Finally, on UTRAN, turn down the auth if we don't have UMTS AKA, and neatly log all of the potential causes. One corner case that should never occur is that the UMTS AKA RES length is actually the same length as the GSM AKA SRES. If this nevertheless occurs, log this as an error, though not turning down authentication because of it. (The effect is that we would favor UMTS AKA when it has a res_len == sizeof(sres) and would not succeed to GSM AKA. At least the log will tell us why, now.) Adjust an expected test output, trivial logging difference. Change-Id: I43f7f301ea85e518bac91f707391a53182e54fab
Diffstat (limited to 'tests/msc_vlr')
-rw-r--r--tests/msc_vlr/msc_vlr_test_gsm_authen.err2
-rw-r--r--tests/msc_vlr/msc_vlr_test_umts_authen.err10
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err
index a454e2fb5..590b31932 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err
@@ -2074,7 +2074,7 @@ DMM IMSI:901700000004620: MM AUTHENTICATION RESPONSE: invalid: parsing GSM AKA A
DMM IMSI:901700000004620: MM GSM AUTHENTICATION RESPONSE (sres = )
DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP
DVLR SUBSCR(IMSI:901700000004620) received res:
-DVLR SUBSCR(IMSI:901700000004620) AUTH RES missing or too short (0)
+DVLR SUBSCR(IMSI:901700000004620) AUTH SRES/RES missing
DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_AUTH_FAILED
DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTH_FAILED
DVLR GSUP tx: 0b010809710000004026f0
diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err
index 77a056fa7..5573c02cf 100644
--- a/tests/msc_vlr/msc_vlr_test_umts_authen.err
+++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err
@@ -1447,7 +1447,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)
DMM IMSI:901700000010650: MM UMTS AUTHENTICATION RESPONSE (res = e229c19e791f2e)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP
DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e
-DVLR SUBSCR(IMSI:901700000010650) GSM AUTH failure: mismatching sres (expected sres=9b 36 ef df )
+DVLR SUBSCR(IMSI:901700000010650) AUTH SRES/RES has invalid length: 7. Expected either 4 (GSM AKA) or 8 (UMTS AKA)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_AUTH_FAILED
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTH_FAILED
DVLR GSUP tx: 0b010809710000000156f0
@@ -1541,7 +1541,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)
DMM IMSI:901700000010650: MM UMTS AUTHENTICATION RESPONSE (res = e229c19e791f2e)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP
DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e
-DVLR SUBSCR(IMSI:901700000010650) AUTH via UTRAN but res_len(7) != vec->res_len(8)
+DVLR SUBSCR(IMSI:901700000010650) AUTH RES has invalid length: 7. Expected 8 (UMTS AKA)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_AUTH_FAILED
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTH_FAILED
DVLR GSUP tx: 0b010809710000000156f0
@@ -1635,7 +1635,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)
DMM IMSI:901700000010650: MM UMTS AUTHENTICATION RESPONSE (res = e229c19e791f2e4123)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP
DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e 41 23
-DVLR SUBSCR(IMSI:901700000010650) GSM AUTH failure: mismatching sres (expected sres=9b 36 ef df )
+DVLR SUBSCR(IMSI:901700000010650) AUTH SRES/RES has invalid length: 9. Expected either 4 (GSM AKA) or 8 (UMTS AKA)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_AUTH_FAILED
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTH_FAILED
DVLR GSUP tx: 0b010809710000000156f0
@@ -1729,7 +1729,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)
DMM IMSI:901700000010650: MM UMTS AUTHENTICATION RESPONSE (res = e229c19e791f2e4123)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP
DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e 79 1f 2e 41 23
-DVLR SUBSCR(IMSI:901700000010650) AUTH via UTRAN but res_len(9) != vec->res_len(8)
+DVLR SUBSCR(IMSI:901700000010650) AUTH RES has invalid length: 9. Expected 8 (UMTS AKA)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_AUTH_FAILED
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTH_FAILED
DVLR GSUP tx: 0b010809710000000156f0
@@ -1917,7 +1917,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)
DMM IMSI:901700000010650: MM GSM AUTHENTICATION RESPONSE (sres = e229c19e)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP
DVLR SUBSCR(IMSI:901700000010650) received res: e2 29 c1 9e
-DVLR SUBSCR(IMSI:901700000010650) AUTH via UTRAN but res_len(4) != vec->res_len(8)
+DVLR SUBSCR(IMSI:901700000010650) AUTH via UTRAN, cannot allow GSM AKA (MS is R99 capable, vec has UMTS AKA tokens, res_len=4 is INVALID on UTRAN)
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result VLR_AUTH_RES_AUTH_FAILED
DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTH_FAILED
DVLR GSUP tx: 0b010809710000000156f0