diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-03-02 10:48:20 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-02 10:48:20 +0100 |
commit | 3f66276bd473d38cf6713bbc13aa1d80fdaaa859 (patch) | |
tree | 3fe038c732ecc759ff4b13c65fdb2627148e585a | |
parent | 544565ae36a6d44e22804d5ad2d39a87ac941a1e (diff) |
hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases
Change-Id: I6ded77b3029aae6bc3fe022190819b6a86189f5a
-rw-r--r-- | hlr/HLR_Tests.ttcn | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index eca4f4be..8b216266 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -353,15 +353,28 @@ runs on test_CT return GSUP_PDU { testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT { - var hexstring imsi := '01234'H; + /* 23.003 Section 2.2 clearly states that an IMSI with less + * than 5 digits is impossible. Even 5 digits is still questionable */ + var hexstring imsi := '0123'H; var GSUP_PDU res; f_init(); - res := f_perform_SAI(imsi, 17); + res := f_perform_SAI(imsi, 96); /* Invalid Mandatory information */ setverdict(pass); } +testcase TC_gsup_sai_err_unknown_imsi() runs on test_CT { + var hexstring imsi := f_rnd_imsi('26242'H); + var GSUP_PDU res; + + f_init(); + + res := f_perform_SAI(imsi, 2); + setverdict(pass); +} + + /* test SAI for a number of different subscriber cases (algo, 2g/3g, ...) */ testcase TC_gsup_sai() runs on test_CT { var HlrSubscriberList sl; @@ -545,6 +558,7 @@ control { execute( TC_gsup_sai_err_invalid_imsi() ); execute( TC_gsup_sai() ); execute( TC_gsup_ul_unknown_imsi() ); + execute( TC_gsup_sai_err_unknown_imsi() ); execute( TC_gsup_ul() ); execute( TC_vty() ); execute( TC_vty_msisdn_isd() ); |