This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Stefan Sperling gerrit-no-reply at lists.osmocom.orgStefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/12380
Change subject: add a test for LU with invalid LAI
......................................................................
add a test for LU with invalid LAI
Verify that the MSC rejects a location update with a LAI that
contains a PLMN which does not match the network's PLMN.
Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1
Related: OS#3162
---
M msc/MSC_Tests.cfg
M msc/MSC_Tests.ttcn
M msc/expected-results.xml
3 files changed, 36 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/12380/1
diff --git a/msc/MSC_Tests.cfg b/msc/MSC_Tests.cfg
index b412889..efe4666 100644
--- a/msc/MSC_Tests.cfg
+++ b/msc/MSC_Tests.cfg
@@ -61,3 +61,4 @@
#MSC_Tests.TC_reset_two
#MSC_Tests.TC_lu_and_mt_call
#MSC_Tests.TC_cipher_complete_with_invalid_cipher
+#MSC_Tests.TC_lu_with_invalid_lai
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 1b37329..bf83427 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2826,6 +2826,38 @@
vc_conn.done;
}
+/* Location Update with PLMN mismatch in the LAI. */
+private function f_tc_lu_with_invalid_lai(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
+ f_init_handler(pars);
+
+ /* tell GSUP dispatcher to send this IMSI to us */
+ f_create_gsup_expect(hex2str(g_pars.imsi));
+
+ /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+ var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
+ /* Override the location update's LAI with a different PLMN; osmo-msc.cfg uses mcc 262 mnc 42 */
+ l3_lu.msgs.mm.locationUpdateRequest.locationAreaIdentification.mcc_mnc := f_enc_mcc_mnc('262'H, '23'H);
+ f_bssap_compl_l3(l3_lu);
+
+ /* Expect LU reject from MSC. */
+ alt {
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) {
+ setverdict(pass);
+ }
+ [] BSSAP.receive {
+ setverdict(fail, "Unknown/unexpected BSSAP received");
+ mtc.stop;
+ }
+ }
+}
+
+testcase TC_lu_with_invalid_lai() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+ f_init();
+ vc_conn := f_start_handler(refers(f_tc_lu_with_invalid_lai), 53);
+ vc_conn.done;
+}
+
/* TODO (SMS):
* different user data lengths
* SMPP transaction mode with unsuccessful delivery
@@ -2916,6 +2948,8 @@
execute( TC_cipher_complete_with_invalid_cipher() );
+ execute( TC_lu_with_invalid_lai() );
+
/* Run this last: at the time of writing this test crashes the MSC */
execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() );
execute( TC_mo_cc_bssmap_clear() );
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index 83c8010..8eebd57 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -70,6 +70,7 @@
<testcase classname='MSC_Tests' name='TC_lu_and_mo_ussd_mo_release' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_lu_and_ss_session_timeout' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_cipher_complete_with_invalid_cipher' time='MASKED'/>
+ <testcase classname='MSC_Tests' name='TC_lu_with_invalid_lai' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_mo_cc_bssmap_clear' time='MASKED'/>
</testsuite>
--
To view, visit https://gerrit.osmocom.org/12380
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1
Gerrit-Change-Number: 12380
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <stsp at stsp.name>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181219/31f132c8/attachment.htm>