Change in osmo-mgw[master]: IuUP hack: make RTP patching less general

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Jul 24 10:25:05 UTC 2018


Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/10118 )

Change subject: IuUP hack: make RTP patching less general
......................................................................

IuUP hack: make RTP patching less general

We currently still patch over an RTP message to make it look like an IuUP
Initialization Ack specifically for the ip.access nano3G femto cell.

Be more specific about it:

- only patch over RTP in 'loopback' mode. osmo-msc specifically leaves the
  endpoint in loopback mode for this hack, so if we're not in 'loopback', then
  this hack is out of place.

- only patch over RTP if the header indicates an IuUP Initialization (check for
  0xe4 byte).

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

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



diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 7d98d07..3ac93be 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -732,11 +732,18 @@
 			 * 'e400', or it will reject the RAB assignment. It seems to not harm other femto
 			 * cells (as long as we patch only the first RTP payload in each stream).
 			 */
-			if (!rtp_state->patched_first_rtp_payload) {
+			if (!rtp_state->patched_first_rtp_payload
+			    && conn_src->conn->mode == MGCP_CONN_LOOPBACK) {
 				uint8_t *data = (uint8_t *) & buf[12];
-				data[0] = 0xe4;
-				data[1] = 0x00;
-				rtp_state->patched_first_rtp_payload = true;
+				if (data[0] == 0xe0) {
+					data[0] = 0xe4;
+					data[1] = 0x00;
+					rtp_state->patched_first_rtp_payload = true;
+					LOGP(DRTP, LOGL_DEBUG,
+					     "endpoint:0x%x Patching over first two bytes"
+					     " to fake an IuUP Initialization Ack\n",
+					     ENDPOINT_NUMBER(endp));
+				}
 			}
 
 			len = mgcp_udp_send(rtp_end->rtp.fd,

-- 
To view, visit https://gerrit.osmocom.org/10118
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: Ia9ec4debc138b34f6ca6a871a8778eafa6c0ba21
Gerrit-Change-Number: 10118
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180724/a84f49bd/attachment.htm>


More information about the gerrit-log mailing list