summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-20 14:58:19 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-20 14:58:19 +0200
commite6ed009a36d410fc0cbac7a82d92313bd6d4c084 (patch)
tree23ad7fed198f621cc414a3dee3341ebc934f3c76 /openbsc/src/osmo-bsc_nat
parentceef936ea894781a14584efc9256856cca6d1c0f (diff)
mgcp: Begin to separate network and bts endpoints
Make it possible to bind the call-agent to a specific IP address and the network and bts end to different ip addresses. Begin by clarifying which source ip address we want to have.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index f04c981..f19cb4c 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -269,7 +269,7 @@ static void bsc_mgcp_send_mdcx(struct bsc_connection *bsc, int port, struct mgcp
"\r\n"
"c=IN IP4 %s\r\n"
"m=audio %d RTP/AVP 255\r\n",
- port, bsc->nat->mgcp_cfg->source_addr,
+ port, mgcp_bts_src_addr(endp),
endp->bts_end.local_port);
if (len < 0) {
LOGP(DMGCP, LOGL_ERROR, "snprintf for MDCX failed.\n");
@@ -550,7 +550,7 @@ static int bsc_mgcp_policy_cb(struct mgcp_trunk_config *tcfg, int endpoint, int
/* we need to generate a new and patched message */
bsc_msg = bsc_mgcp_rewrite((char *) nat->mgcp_msg, nat->mgcp_length,
- sccp->bsc_endp, nat->mgcp_cfg->source_addr,
+ sccp->bsc_endp, mgcp_bts_src_addr(mgcp_endp),
mgcp_endp->bts_end.local_port, osmux_cid,
&mgcp_endp->net_end.codec.payload_type,
nat->sdp_ensure_amr_mode_set);
@@ -745,7 +745,7 @@ void bsc_mgcp_forward(struct bsc_connection *bsc, struct msgb *msg)
* with the value of 0 should be no problem.
*/
output = bsc_mgcp_rewrite((char * ) msg->l2h, msgb_l2len(msg), -1,
- bsc->nat->mgcp_cfg->source_addr,
+ mgcp_net_src_addr(endp),
endp->net_end.local_port, -1,
&endp->bts_end.codec.payload_type,
bsc->nat->sdp_ensure_amr_mode_set);