summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-09-21 14:18:36 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2020-09-24 17:36:54 +0200
commit102e5d82b17df9773b2dffb5d9df302edb5e0a8b (patch)
treea503c5cf9d43d79e656023638cd969d7d621dfc4
parentc5398f73dea5c38feb3ad012ff2c482ac85ae241 (diff)
MSC_ConnectionHandler: use IPV4 as defaultpmaier/test_v6
When the BSC sends a CRCX without an IP address in it, the testcase will automatically assign an IPV6 address in the response. However, this breaks compatibility with older versions of osmo-bsc that do not have IPV6 support. Change-Id: I30c77abef63636bb02db12d2f2b2d79ea244b96c
-rw-r--r--bsc/BSC_Tests.ttcn3
-rw-r--r--bsc/MSC_ConnectionHandler.ttcn15
2 files changed, 15 insertions, 3 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 0fd0a17..01e65c2 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -611,6 +611,8 @@ modulepar {
boolean mp_enable_osmux_test := true;
/* Value set in osmo-bsc.cfg "ms max power" */
uint8_t mp_exp_ms_power_level := 7;
+
+ boolean mp_media_mgw_offer_ipv6 := true;
}
private function f_gen_test_hdlr_pars(integer bssap_idx := 0) return TestHdlrParams {
@@ -623,6 +625,7 @@ private function f_gen_test_hdlr_pars(integer bssap_idx := 0) return TestHdlrPar
}
pars.exp_ms_power_level := mp_exp_ms_power_level;
pars.mscpool.bssap_idx := bssap_idx;
+ pars.media_mgw_offer_ipv6 := mp_media_mgw_offer_ipv6;
return pars;
}
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index c372709..3d6538a 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -279,7 +279,14 @@ function f_rx_crcx(MgcpCommand mgcp_cmd)
var MgcpOsmuxCID osmux_cid;
var SDP_Message sdp;
var integer cid := f_get_free_mgcp_conn();
- var charstring local_rtp_addr := host_mgw_rtp_v6; /* Use IPv6 by default if no remote addr is provided by client */
+ var charstring local_rtp_addr;
+
+ if (g_pars.media_mgw_offer_ipv6 == true) {
+ local_rtp_addr := host_mgw_rtp_v6; /* Use IPv6 by default if no remote addr is provided by client */
+ } else {
+ local_rtp_addr := host_mgw_rtp_v4; /* Use IPv4 by default if no remote addr is provided by client */
+ }
+
if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) {
if (cid != 0) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "MGCP wildcard EP only works in first CRCX");
@@ -553,7 +560,8 @@ type record TestHdlrParams {
boolean aoip,
boolean use_osmux,
charstring host_aoip_tla,
- TestHdlrParamsMSCPool mscpool
+ TestHdlrParamsMSCPool mscpool,
+ boolean media_mgw_offer_ipv6
};
/* Note: Do not use valueof() to get a value of this template, use
@@ -587,7 +595,8 @@ template (value) TestHdlrParams t_def_TestHdlrPars := {
bssap_idx := 0,
rsl_idx := 0,
l3_info := omit
- }
+ },
+ media_mgw_offer_ipv6 := true
}
function f_create_chan_and_exp() runs on MSC_ConnHdlr {