From c390ae8eaf0fd505ae1138b356358e0bcfe13e61 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 20 Aug 2015 15:15:50 +0200 Subject: mgcp: Allow to bind to different ports for net/bts ports When using multiple interfaces on a system one can now configure which will be served for the BTS ports and which will be served for the network. The direct usage of source_addr is now only to initialize the MGCP receiving port itself. --- openbsc/include/openbsc/mgcp_internal.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'openbsc/include/openbsc/mgcp_internal.h') diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h index f97292d9a..1f836595b 100644 --- a/openbsc/include/openbsc/mgcp_internal.h +++ b/openbsc/include/openbsc/mgcp_internal.h @@ -327,10 +327,14 @@ int mgcp_set_audio_info(void *ctx, struct mgcp_rtp_codec *codec, */ static inline const char *mgcp_net_src_addr(struct mgcp_endpoint *endp) { + if (endp->cfg->bts_ports.bind_addr) + return endp->cfg->bts_ports.bind_addr; return endp->cfg->source_addr; } static inline const char *mgcp_bts_src_addr(struct mgcp_endpoint *endp) { + if (endp->cfg->net_ports.bind_addr) + return endp->cfg->net_ports.bind_addr; return endp->cfg->source_addr; } -- cgit v1.2.3