aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-21 20:58:35 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-30 19:07:47 +0200
commitdceacc77e74935c5819c45ed513bdb761a7c1813 (patch)
tree536eefe5c8eb63e2967a082f94cbaa943d781695
parent9b751a6575333a854b777cc8fb894328e51fcafe (diff)
msc: Introduce f_cl3_or_initial_ue as replacement for f_bssap_compl_l3()
The new function will check the RAN type and dispath to f_bssap_compl_l3() in case of 2G/GERAN and to f_ranap_initial_ue() on case of 3G/UTRAN. Change-Id: Ia27afa265d441d1a0cbb40cc2d938aff46fa25f9
-rw-r--r--msc/BSC_ConnectionHandler.ttcn16
-rw-r--r--msc/MSC_Tests.ttcn44
2 files changed, 33 insertions, 27 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index e603035e..1fd02aae 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -311,6 +311,16 @@ runs on BSC_ConnHdlr {
}
}
+/* Send BSSMAP Complete L3 or RANAP Initial UE depending on 2G/3G RAN type */
+function f_cl3_or_initial_ue(PDU_ML3_MS_NW l3)
+runs on BSC_ConnHdlr {
+ if (g_pars.ran_is_geran) {
+ f_bssap_compl_l3(l3);
+ } else {
+ f_ranap_initial_ue(l3);
+ }
+}
+
type enumerated EstablishType {
EST_TYPE_MO_CALL,
EST_TYPE_EMERG_CALL,
@@ -351,11 +361,7 @@ runs on BSC_ConnHdlr {
}
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- if (g_pars.ran_is_geran) {
- f_bssap_compl_l3(l3_info);
- } else {
- f_ranap_initial_ue(l3_info);
- }
+ f_cl3_or_initial_ue(l3_info);
f_mm_common();
if (g_pars.net.expect_ciph) {
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 110c165e..af654a3b 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -592,7 +592,7 @@ private function f_tc_lu_imsi_reject(charstring id, BSC_ConnHdlrPars pars) runs
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi);
f_create_gsup_expect(hex2str(g_pars.imsi));
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 23));
alt {
@@ -619,7 +619,7 @@ private function f_tc_lu_imsi_timeout_gsup(charstring id, BSC_ConnHdlrPars pars)
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi);
f_create_gsup_expect(hex2str(g_pars.imsi));
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
/* Normally the HLR would need to respond here, but we decide to force a timeout here */
alt {
@@ -682,7 +682,7 @@ runs on BSC_ConnHdlr {
f_create_gsup_expect(hex2str(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(l3_info);
+ f_cl3_or_initial_ue(l3_info);
timer T := 10.0;
T.start;
@@ -742,7 +742,7 @@ private function f_tc_lu_auth_sai_timeout(charstring id, BSC_ConnHdlrPars pars)
f_create_gsup_expect(hex2str(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
/* Send Early Classmark, just for the fun of it */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -773,7 +773,7 @@ private function f_tc_lu_auth_sai_err(charstring id, BSC_ConnHdlrPars pars) runs
f_create_gsup_expect(hex2str(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
/* Send Early Classmark, just for the fun of it */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -804,7 +804,7 @@ private function f_tc_lu_clear_request(charstring id, BSC_ConnHdlrPars pars) run
f_create_gsup_expect(hex2str(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
/* Send Early Classmark, just for the fun of it */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -847,7 +847,7 @@ private function f_tc_lu_disconnect(charstring id, BSC_ConnHdlrPars pars) runs o
f_create_gsup_expect(hex2str(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
/* Send Early Classmark, just for the fun of it */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -878,7 +878,7 @@ private function f_tc_lu_by_imei(charstring id, BSC_ConnHdlrPars pars) runs on B
f_create_gsup_expect(hex2str(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
/* Send Early Classmark, just for the fun of it */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -911,7 +911,7 @@ private function f_tc_lu_tmsi_noauth_unknown(charstring id, BSC_ConnHdlrPars par
f_create_gsup_expect(hex2str(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
/* Send Early Classmark, just for the fun of it */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -959,7 +959,7 @@ private function f_tc_imsi_detach_by_imsi(charstring id, BSC_ConnHdlrPars pars)
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
+ f_cl3_or_initial_ue(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
/* Send Early Classmark, just for the fun of it? */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -982,7 +982,7 @@ private function f_tc_imsi_detach_by_tmsi(charstring id, BSC_ConnHdlrPars pars)
var MobileIdentityLV mi := valueof(ts_MI_TMSI_LV('01020304'O));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
+ f_cl3_or_initial_ue(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
/* Send Early Classmark, just for the fun of it? */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -1005,7 +1005,7 @@ private function f_tc_imsi_detach_by_imei(charstring id, BSC_ConnHdlrPars pars)
var MobileIdentityLV mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
+ f_cl3_or_initial_ue(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
/* Send Early Classmark, just for the fun of it? */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -1037,7 +1037,7 @@ private function f_tc_emerg_call_imei_reject(charstring id, BSC_ConnHdlrPars par
var MobileIdentityLV mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_EMERG_CALL, mi));
- f_bssap_compl_l3(l3_info);
+ f_cl3_or_initial_ue(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ('05'O)));
f_expect_clear();
}
@@ -1074,7 +1074,7 @@ private function f_tc_cm_serv_req_vgcs_reject(charstring id, BSC_ConnHdlrPars pa
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_VGCS, mi));
- f_bssap_compl_l3(l3_info);
+ f_cl3_or_initial_ue(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1))));
f_expect_clear();
}
@@ -1095,7 +1095,7 @@ private function f_tc_cm_serv_req_vbs_reject(charstring id, BSC_ConnHdlrPars par
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_VBS, mi));
- f_bssap_compl_l3(l3_info);
+ f_cl3_or_initial_ue(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1))));
f_expect_clear();
}
@@ -1116,7 +1116,7 @@ private function f_tc_cm_serv_req_lcs_reject(charstring id, BSC_ConnHdlrPars par
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_LCS, mi));
- f_bssap_compl_l3(l3_info);
+ f_cl3_or_initial_ue(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1))));
f_expect_clear();
}
@@ -1137,7 +1137,7 @@ private function f_tc_cm_reest_req_reject(charstring id, BSC_ConnHdlrPars pars)
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_REEST_REQ(0, mi));
- f_bssap_compl_l3(l3_info);
+ f_cl3_or_initial_ue(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1))));
f_expect_clear();
}
@@ -1159,7 +1159,7 @@ private function f_tc_lu_auth_2G_fail(charstring id, BSC_ConnHdlrPars pars) runs
f_create_gsup_expect(hex2str(g_pars.imsi));
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
/* Send Early Classmark, just for the fun of it */
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
@@ -1624,7 +1624,7 @@ private function f_tc_gsup_cancel(charstring id, BSC_ConnHdlrPars pars) runs on
/* Follow-up transactions should fail */
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
- f_bssap_compl_l3(l3_info);
+ f_cl3_or_initial_ue(l3_info);
alt {
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ)) { }
[] BSSAP.receive {
@@ -1691,7 +1691,7 @@ private function f_tc_lu_imsi_auth_tmsi_encr_3_1(charstring id, BSC_ConnHdlrPars
/* cannot use f_perform_lu() as we expect a reject */
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi);
f_create_gsup_expect(hex2str(g_pars.imsi));
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
if (pars.send_early_cm) {
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
} else {
@@ -1766,7 +1766,7 @@ private function f_tc_lu_imsi_auth_tmsi_encr_13_2(charstring id, BSC_ConnHdlrPar
/* cannot use f_perform_lu() as we expect a reject */
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi);
f_create_gsup_expect(hex2str(g_pars.imsi));
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
f_mm_auth();
alt {
@@ -3502,7 +3502,7 @@ private function f_tc_cipher_complete_with_invalid_cipher(charstring id, BSC_Con
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
- f_bssap_compl_l3(l3_lu);
+ f_cl3_or_initial_ue(l3_lu);
f_mm_auth();