Change in osmo-mgw[master]: mgcp_client: copy back Connection Information from MDCX ACK

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/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Sep 2 19:02:29 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/19953 )


Change subject: mgcp_client: copy back Connection Information from MDCX ACK
......................................................................

mgcp_client: copy back Connection Information from MDCX ACK

This is needed in case MGW changes the local IP address (for instance
because it initlaly offered an IPv4 address, and a client submitted a
remote IPv6 address, so MGW needs then to offer a local IPv6 address for
the RTP connection to be possible).

Change-Id: Ie964412b81fe6e10914790baaea724ca5f772adc
---
M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
1 file changed, 11 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/53/19953/1

diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
index c68d8b3..c1fc0de 100644
--- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
@@ -469,14 +469,12 @@
 
 	ci->pending = false;
 
+	rtp_info = data;
+
 	switch (ci->verb) {
 	case MGCP_VERB_CRCX:
 		/* If we sent a wildcarded endpoint name on CRCX, we need to store the resulting endpoint
 		 * name here. Also, we receive the MGW's RTP port information. */
-		rtp_info = data;
-		OSMO_ASSERT(rtp_info);
-		ci->got_port_info = true;
-		ci->rtp_info = *rtp_info;
 		osmo_strlcpy(ci->mgcp_ci_str, mgcp_conn_get_ci(ci->mgcp_client_fi),
 			sizeof(ci->mgcp_ci_str));
 		if (rtp_info->endpoint[0]) {
@@ -486,6 +484,15 @@
 				return;
 		}
 		ci->ep->first_crcx_complete = true;
+		OSMO_ASSERT(rtp_info);
+		/* fall through */
+	case MGCP_VERB_MDCX:
+		/* Always update the received RTP ip/port information, since MGW
+		 * may provide new one after remote end params changed */
+		if (rtp_info) {
+			ci->got_port_info = true;
+			ci->rtp_info = *rtp_info;
+		}
 		break;
 
 	default:

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/19953
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ie964412b81fe6e10914790baaea724ca5f772adc
Gerrit-Change-Number: 19953
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200902/99e76aa8/attachment.htm>


More information about the gerrit-log mailing list