diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-12-04 12:05:06 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-12-05 13:44:25 +0100 |
commit | 5673e295a5184ea995cbafeba5f1a5a8023ce1cf (patch) | |
tree | b7f3071f31b7d0abc3344b7dcf8e2ffbd0aaab24 | |
parent | a213c5d1902ca5cd2e1068ad60561b581bf347af (diff) |
IuUP: Allow Initialization with set rem IP address and unset rem portpespin/proposal
Do not refuse IuUP Initialization messages coming in on an RTP port if
the remote port is not yet known.
If an IUFP conn is not yet configured (pre-Initialization), allow rx
from any address or port.
An osmo-mgw client (eg. osmo-hnbgw) may wish to initially set a remote
IP address as a hint during CRCX, hence the IP address may already be
set while the port may be unset.
Related: SYS#6657
Change-Id: Idd833997abce46886e9664505b2776fa5dadc8db
-rw-r--r-- | src/libosmo-mgcp/mgcp_network.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index c5293afa9..93c42e95b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -834,7 +834,8 @@ 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 (osmo_sockaddr_is_any(&conn->end.addr) != 0 || + osmo_sockaddr_port(&conn->end.addr.u.sa) == 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 |