pespin has submitted this change. (
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(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
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 */
--
To view, visit
https://gerrit.osmocom.org/c/osmo-mgw/+/29288
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I305f2501221e86d1eb0140446c03f36698f3194a
Gerrit-Change-Number: 29288
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged