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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10119 ) Change subject: fix 3G hack: allow any IP for loopback and 0.0.0.0 ...................................................................... fix 3G hack: allow any IP for loopback and 0.0.0.0 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. None of these are anything near nice, during call setup using a 3G femto cell, we still lack a proper IuUP handling. See OS#2459, OS#1937. This is merely a temporary hack to maintain 3G voice usability in a quick and dirty way. Related: OS#3411 Change-Id: Ib25e6261855eae8ddb8d1c0b8838cc3e30332cf1 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index c85a11d..a73209b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -872,6 +872,22 @@ { struct mgcp_endpoint *endp; endp = conn->conn->endp; + struct sockaddr_in zero_addr = {}; + + if (memcmp(&zero_addr, &conn->end.addr, sizeof(zero_addr)) == 0 + && conn->conn->mode == 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. */ + LOGP(DRTP, LOGL_ERROR, + "endpoint:0x%x In loopback mode and remote address not set: allowing data from address: %s\n", + ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr)); + return 0; + } /* Note: Check if the inbound RTP data comes from the same host to * which we send our outgoing RTP traffic. */ -- To view, visit https://gerrit.osmocom.org/10119 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: Ib25e6261855eae8ddb8d1c0b8838cc3e30332cf1 Gerrit-Change-Number: 10119 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180824/f1f584da/attachment.htm>