pespin submitted this change.

View Change



3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: neels: Looks good to me, approved Jenkins Builder: Verified
check_rtp_origin: drop special case for legacy IuUP hack

We have proper IuUP support and everything about this legacy hack should
be purged.

The purpose of this function is to validate that RTP is coming from the
expected address and port. To allow that legacy IuUP hack, which is no
longer needed, we punched a hole into this validation, by adding this
special case for loopback mode (suddenly we don't care who or what sends
RTP and bounce it back to anyone). So let's get rid of this hole that
was only needed for very early 3G voice hacking.

Instead, we permit RTP for IuUP Initialization regardless of the RTP
loopback/send/recv mode since I6c365559a7bd197349f0ea99f7a13b56a4bb580b

Related: SYS#6657
Change-Id: I158dd046fdfcb10392cde3de8cc88dd095a05b40
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 6a726d4..994ce45 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -847,29 +847,13 @@
osmo_sockaddr_to_str(addr));
return 0;
}
- switch (conn->conn->mode) {
- case MGCP_CONN_LOOPBACK:
- /* HACK: for IuUP, we want to reply with an IuUP Initialization ACK upon the first RTP
- * message received. We currently hackishly accomplish that by putting the endpoint in
- * loopback mode and patching over the looped back RTP message to make it look like an
- * ack. We don't know the femto cell's IP address and port until the RAB Assignment
- * Response is received, but the nano3G expects an IuUP Initialization Ack before it even
- * sends the RAB Assignment Response. Hence, if the remote address is 0.0.0.0 and the
- * MGCP port is in loopback mode, allow looping back the packet to any source. */
- LOGPCONN(conn->conn, DRTP, LOGL_ERROR,
- "In loopback mode and remote address not set: allowing data from address: %s\n",
- osmo_sockaddr_to_str(addr));
- return 0;
-
- default:
- /* Receiving early media before the endpoint is configured. Instead of logging
- * this as an error that occurs on every call, keep it more low profile to not
- * confuse humans with expected errors. */
- LOGPCONN(conn->conn, DRTP, LOGL_INFO,
- "Rx RTP from %s, but remote address not set: dropping early media\n",
- osmo_sockaddr_to_str(addr));
- return -1;
- }
+ /* Receiving early media before the endpoint is configured. Instead of logging
+ * this as an error that occurs on every call, keep it more low profile to not
+ * confuse humans with expected errors. */
+ LOGPCONN(conn->conn, DRTP, LOGL_INFO,
+ "Rx RTP from %s, but remote address not set: dropping early media\n",
+ osmo_sockaddr_to_str(addr));
+ return -1;
}

/* Note: Check if the inbound RTP data comes from the same host to

To view, visit change 35181. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I158dd046fdfcb10392cde3de8cc88dd095a05b40
Gerrit-Change-Number: 35181
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged