From 9b690e42e110e4697ae1543d87e8a5f313aabefb Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 21 Dec 2018 11:50:03 +0100 Subject: MSC_ConnectionHandler: Optionally check MM Info The MM Info message is an optional message that is set to the MS usually after the location update. It contains the full network name and time information. At the moment the presence of this message is not checked or expected since sending of MM-Info is explicitly disabled in the osmo-msc configu. This patch adds an optional check of MM Info that is disabled by default. Change-Id: I431f50c2ff3536f87f0c7c3caf23b7a38d501904 Related: OS#3615 --- library/L3_Templates.ttcn | 20 ++++++++++++++++++++ msc/BSC_ConnectionHandler.ttcn | 13 ++++++++++++- msc/MSC_Tests.ttcn | 7 ++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 3918f3d9..3978498f 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -2972,6 +2972,26 @@ template PDU_ML3_NW_MS tr_ML3_MT_SMS(template uint3_t tid, template BIT1 ti_flag } } +template PDU_ML3_NW_MS tr_ML3_MT_MM_Info := { + discriminator := '0101'B, + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + mm := { + mMInformation := { + messageType := '110010'B, + nsd := '00'B, + fullNetworkName := *, + shortNetworkName := *, + localtimeZone := *, + univTime := *, + lSAIdentity := *, + networkDST := * + } + } + } +} diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 1b31f75d..bf83dd35 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -69,7 +69,8 @@ type record BSC_ConnHdlrPars { boolean send_early_cm, charstring ipa_ctrl_ip, integer ipa_ctrl_port, - boolean ipa_ctrl_enable + boolean ipa_ctrl_enable, + boolean mm_info }; /* get a one-octet bitmaks of supported algorithms based on Classmark information */ @@ -315,6 +316,12 @@ function f_mm_common() runs on BSC_ConnHdlr } } +function f_expect_mm_info() runs on BSC_ConnHdlr { + if (g_pars.mm_info == true) { + BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_Info)); + } +} + function f_perform_lu() runs on BSC_ConnHdlr { var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi) @@ -363,6 +370,10 @@ runs on BSC_ConnHdlr { mtc.stop; } } + + /* Wait for MM-Information (if enabled) */ + f_expect_mm_info(); + /* FIXME: there could be pending SMS or other common procedures by the MSC, let's ignore them */ BSSAP.receive(tr_BSSMAP_ClearCommand); BSSAP.send(ts_BSSMAP_ClearComplete); diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index d121b63b..0ac61bc0 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -95,6 +95,7 @@ modulepar { integer mp_msc_vty_port := 4254; /* local parameters of emulated HLR */ + boolean mp_mm_info := false; charstring mp_hlr_ip := "127.0.0.1"; integer mp_hlr_port := 4222; charstring mp_mgw_ip := "127.0.0.1"; @@ -457,7 +458,8 @@ function f_init_pars(integer imsi_suffix) runs on MTC_CT return BSC_ConnHdlrPars send_early_cm := true, ipa_ctrl_ip := mp_msc_ip, ipa_ctrl_port := mp_msc_ctrl_port, - ipa_ctrl_enable := true + ipa_ctrl_enable := true, + mm_info := mp_mm_info }; return pars; } @@ -855,6 +857,9 @@ private function f_tc_lu_tmsi_noauth_unknown(charstring id, BSC_ConnHdlrPars par } } + /* Wait for MM-Information (if enabled) */ + f_expect_mm_info(); + /* wait for normal teardown */ f_expect_clear(); } -- cgit v1.2.3