hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases

Change-Id: I6ded77b3029aae6bc3fe022190819b6a86189f5a
This commit is contained in:
Harald Welte 2018-03-02 10:48:20 +01:00
parent 544565ae36
commit 3f66276bd4
1 changed files with 16 additions and 2 deletions

View File

@ -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() );