Change in osmo-mgw[master]: osmux: Use remote port to send osmux frames

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun May 19 07:29:08 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14033 )

Change subject: osmux: Use remote port to send osmux frames
......................................................................

osmux: Use remote port to send osmux frames

Previously the local one was used but nobody cared because probably
everybody was using default 1984 on different IP addresses.

Change-Id: I01e590465fa247185d74103578681e9041249099
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 7290ba3..9bbc1b2 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -323,7 +323,7 @@
 {
 	switch(conn->osmux.state) {
 	case OSMUX_STATE_ACTIVATING:
-	if (osmux_enable_conn(endp, conn, &conn->end.addr, htons(endp->cfg->osmux_port)) < 0) {
+	if (osmux_enable_conn(endp, conn, &conn->end.addr, conn->end.rtp_port) < 0) {
 			LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR,
 				 "Could not enable osmux for conn:%s\n",
 				 mgcp_conn_dump(conn->conn));
@@ -332,7 +332,7 @@
 		LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR,
 			 "Osmux CID %u for %s:%u is now enabled\n",
 			 conn->osmux.cid, inet_ntoa(conn->end.addr),
-			 endp->cfg->osmux_port);
+			 ntohs(conn->end.rtp_port));
 		return 0;
 	case OSMUX_STATE_ENABLED:
 		return 0;
@@ -701,7 +701,7 @@
 		 inet_ntoa(conn->end.addr), conn->osmux.cid);
 
 	return mgcp_udp_send(osmux_fd.fd, &conn->end.addr,
-			     htons(endp->cfg->osmux_port), buf, sizeof(buf));
+			     conn->end.rtp_port, buf, sizeof(buf));
 }
 
 /* bsc-nat allocates/releases the Osmux circuit ID. +7 to round up to 8 bit boundary. */

-- 
To view, visit https://gerrit.osmocom.org/14033
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I01e590465fa247185d74103578681e9041249099
Gerrit-Change-Number: 14033
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190519/35dc7635/attachment.htm>


More information about the gerrit-log mailing list