aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2023-12-04 03:54:43 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2023-12-05 13:49:10 +0100
commit5e101c9fed085771db8001ca9200942175ceda8f (patch)
treee771aca63eb835cae980f3684e6e91c2684a52e7
parentf6db465082f7cf2864037a8bfa778ad144a90a6d (diff)
IuUP: allow Initialization from any address if not yet set
Do not refuse IuUP Initialization messages coming in on an RTP port if the remote IP address is not yet known. If an IUFP conn is not yet configured (pre-Initialization), allow rx from any remote address if the remote IP address is not yet known. If we refuse the IuUP Initialization, a 3G RNC may fail to set up a RAB. We will know the remote address only *after* assigning a RAB succeeded. So the IuUP Initialization must be allowed before knowing all addresses. At the time of writing, CRCX for IUFP are sent to osmo-mgw in either LOOPBACK or in RECVONLY mode: - current osmo-msc: recvonly - osmo-msc <= v1.10.0: loopback - osmo-hnbgw: loopback IuUP Initialization should work regardless of that. See also next patch I158dd046fdfcb10392cde3de8cc88dd095a05b40 IuUP is one layer below the loopback/send/recv decision for RTP; IuUP is always terminated at the MGW, while the AMR payload carries through. Related: alternative patch Idd833997abce46886e9664505b2776fa5dadc8db Related: SYS#6657 Change-Id: I6c365559a7bd197349f0ea99f7a13b56a4bb580b
-rw-r--r--src/libosmo-mgcp/mgcp_network.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index b1bce9770..6a726d49c 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -835,6 +835,18 @@ static int check_rtp_origin(struct mgcp_conn_rtp *conn, struct osmo_sockaddr *ad
char ipbuf[INET6_ADDRSTRLEN];
if (osmo_sockaddr_is_any(&conn->end.addr) != 0) {
+ if (mgcp_conn_rtp_is_iuup(conn) && !conn->iuup.configured) {
+ /* Allow IuUP Initialization to get through even if we don't have a remote address set yet.
+ * This is needed because hNodeB doesn't announce its IuUP remote IP addr to the MGCP client
+ * (RAB Assignment Response at HNBGW) until it has gone through IuUP Initialization against
+ * this MGW here. Hence the MGW may not yet know the remote IuUP address and port at the time
+ * of receiving IuUP Initialization from the hNodeB.
+ */
+ LOGPCONN(conn->conn, DRTP, LOGL_INFO,
+ "Rx RTP from %s: allowing unknown src for IuUP Initialization\n",
+ 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