[S] Change in osmo-mgw[master]: IuUP: always allow Initialization
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35205?usp=email ) Change subject: IuUP: always allow Initialization ...................................................................... IuUP: always allow Initialization Do not refuse IuUP Initialization messages coming in on an RTP port. If an IUFP conn is not yet configured (pre-Initialization), allow rx from any remote address. 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. Decided for now that it's not worth the extra effort to make this more restrictive; ideas would be: - actually verify the incoming packet to have a valid IuUP Init header before permitting it to be received. - as soon as the remote address is known, also validate the src for IuUP Initialization messages. This patch is nice and simple and does the job. Related: alternative patch Idd833997abce46886e9664505b2776fa5dadc8db Related: SYS#6657 Change-Id: I6c365559a7bd197349f0ea99f7a13b56a4bb580b --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 47 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/35205/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 46d0cb4..e060c1d 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -834,6 +834,15 @@ { char ipbuf[INET6_ADDRSTRLEN]; + /* Allow IuUP Initialization to get through even if we don't have a remote address set yet. */ + if (mgcp_conn_rtp_is_iuup(conn) && !conn->iuup.configured) { + /* maybe todo: also verify that it is actually a valid IuUP Initialization header in the incoming msgb? + * (though, why do we even care where the RTP is coming from) */ + LOGPCONN(conn->conn, DRTP, LOGL_INFO, "Rx RTP from %s: allowing unknown src for IuUP Initialization\n", + osmo_sockaddr_to_str(addr)); + return 0; + } + if (osmo_sockaddr_is_any(&conn->end.addr) != 0) { switch (conn->conn->mode) { case MGCP_CONN_LOOPBACK: -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35205?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6c365559a7bd197349f0ea99f7a13b56a4bb580b Gerrit-Change-Number: 35205 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
neels