Change in osmo-mgw[master]: osmux: Delay osmux enable of conn until remote addr is configured by ...

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:09 UTC 2019


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

Change subject: osmux: Delay osmux enable of conn until remote addr is configured by MDCX
......................................................................

osmux: Delay osmux enable of conn until remote addr is configured by MDCX

Change-Id: I243e53681ebeb3d9cd8ed38bb132172b41745795
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 8 insertions(+), 0 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 4423194..536b65b 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -559,6 +559,7 @@
 	 *  overlapping RTP SSRC traveling to the BTSes behind the BSC,
 	 *  similarly, for flows traveling to the MSC.
 	 */
+	struct in_addr addr_unset = {};
 	static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);
 	uint16_t osmux_dummy = endp->cfg->osmux_dummy;
 
@@ -570,6 +571,13 @@
 		return -1;
 	}
 
+	/* Wait until we have the connection information from MDCX */
+	if (memcmp(&conn->end.addr, &addr_unset, sizeof(addr_unset)) == 0) {
+		LOGPCONN(conn->conn, DLMGCP, LOGL_INFO,
+			"Osmux remote address/port still unknown\n");
+		return -1;
+	}
+
 	conn->osmux.in = osmux_handle_lookup(endp->cfg, addr, port);
 	if (!conn->osmux.in) {
 		LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR,

-- 
To view, visit https://gerrit.osmocom.org/14035
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: I243e53681ebeb3d9cd8ed38bb132172b41745795
Gerrit-Change-Number: 14035
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/90e085a7/attachment.htm>


More information about the gerrit-log mailing list