pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29288 )
Change subject: mgw: Fix osmux conn local IP selection ......................................................................
mgw: Fix osmux conn local IP selection
The local Osmux IP address (cfg->osmux_addr) was never applied in generated MGCP messages. Instead, the RTP one was written into the MGCP message.
Related: SYS#5987 Change-Id: I305f2501221e86d1eb0140446c03f36698f3194a --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/88/29288/1
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index bcc6652..70193e9 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -111,6 +111,17 @@ bool rem_addr_set = !addr_is_any(&conn->end.addr); char *bind_addr;
+ /* Osmux: No smart IP addresses allocation is supported yet. Simply + * return the one set in VTY config: */ + if (mgcp_conn_rtp_is_osmux(conn)) { + bind_addr = conn->conn->endp->trunk->cfg->osmux_addr; + LOGPCONN(conn->conn, DRTP, LOGL_DEBUG, + "using configured osmux bind ip as local bind ip %s\n", + bind_addr); + osmo_strlcpy(addr, bind_addr, INET6_ADDRSTRLEN); + return; + } + /* Try probing the local IP-Address */ if (endp->trunk->cfg->net_ports.bind_addr_probe && rem_addr_set) { rc = osmo_sock_local_ip(addr, osmo_sockaddr_ntop(&conn->end.addr.u.sa, ipbuf)); @@ -125,7 +136,7 @@ } }
- /* Select from preconfigured IP-Addresses. We don't have bind_addr for Osmux (yet?). */ + /* Select from preconfigured IP-Addresses. */ if (rem_addr_set) { /* Check there is a bind IP for the RTP traffic configured, * if so, use that IP-Address */