diff options
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/mgcp.h | 3 | ||||
-rw-r--r-- | openbsc/include/openbsc/mgcp_internal.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 9befa7c7e..aebcda357 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -117,6 +117,9 @@ typedef void (*mgcp_get_format)(struct mgcp_endpoint *endp, struct mgcp_port_range { int mode; + /* addr or NULL to fall-back to default */ + char *bind_addr; + /* pre-allocated from a base? */ int base_port; 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; } |