pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35176?usp=email )
Change subject: mgcp_network: Allow rx of IuUP in loopback mode with set rem IP address and unset rem port
......................................................................
mgcp_network: Allow rx of IuUP in loopback mode with set rem IP address and unset rem 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. We had special cases to handle IuUP
Initialization phase while in loopback mode and IP address being unset,
but we didn't handle the special case where IP address may be set but
port isn't.
Related: SYS#6657
Change-Id: Idd833997abce46886e9664505b2776fa5dadc8db
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 43 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/76/35176/1
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index b1bce97..b423aee 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -860,6 +860,32 @@
}
}
+ if (osmo_sockaddr_port(&conn->end.addr.u.sa) == 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 port number is 0 and the
+ * MGCP conn is in loopback mode, allow looping back the packet to any port. */
+ LOGPCONN(conn->conn, DRTP, LOGL_ERROR,
+ "In loopback mode and remote port 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;
+ }
+ }
+
/* Note: Check if the inbound RTP data comes from the same host to
* which we send our outgoing RTP traffic. */
if (conn->end.addr.u.sa.sa_family != addr->u.sa.sa_family ||
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35176?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: Idd833997abce46886e9664505b2776fa5dadc8db
Gerrit-Change-Number: 35176
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )
Change subject: tests: Test gsmtap logging if write queue fills up
......................................................................
Patch Set 2:
(1 comment)
File tests/logging/logging_test_gsmtap.err:
https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/d158b54a_45ea80e2
PS2, Line 108: 0x611000000328
> this is non-deterministic output, we should not match it
Yeah, do you see any other way of removing such information without changing the log message?
Do we need a name in osmo_wqueue (and default to %p) so we can print that?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 30 Nov 2023 13:39:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, lynxis lazus, pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35078?usp=email )
Change subject: osmo_io: Factor out and use common send function from backend
......................................................................
Patch Set 3:
(2 comments)
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/35078/comment/3fc2633a_13cfb999
PS1, Line 360:
> ack, makes sense, the special case for rc=0 is in the recv path (socket closed). […]
send(len=0) actually succeeds (for TCP sockets) and is currently used in libosmo-netif to check whether a connect() succeeded. The poll-based backend can simply check whether the fd is writable or not. But as Harald mentioned in the SCTP ticket this is not the case with SCTP where write(len=0) returns an error.
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/35078/comment/4d203533_bcb50e25
PS2, Line 196: iofd_handle_send_completion(iofd, rc, msghdr);
> The goto can easily be dropped: […]
Ack
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35078?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6da2653d32aedd0e7872be0cf90a841b56462e59
Gerrit-Change-Number: 35078
Gerrit-PatchSet: 3
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 30 Nov 2023 13:35:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, lynxis lazus, pespin.
Hello Jenkins Builder, lynxis lazus,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35078?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: osmo_io: Factor out and use common send function from backend
......................................................................
osmo_io: Factor out and use common send function from backend
This handles reenqueuing a message on EAGAIN and incomplete write
Change-Id: I6da2653d32aedd0e7872be0cf90a841b56462e59
---
M src/core/osmo_io.c
M src/core/osmo_io_internal.h
M src/core/osmo_io_poll.c
M src/core/osmo_io_uring.c
4 files changed, 58 insertions(+), 60 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/35078/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35078?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6da2653d32aedd0e7872be0cf90a841b56462e59
Gerrit-Change-Number: 35078
Gerrit-PatchSet: 3
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-MessageType: newpatchset
Attention is currently required from: arehbein, laforge, pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35079?usp=email )
Change subject: osmo_io: Remove union in struct osmo_io_ops
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
> I'd actually keep the union, imho there's nothing wrong with it if used, plus: […]
Discussion has happened in the issue: https://projects.osmocom.org/issues/6263
The issue with the union is that ioops.write_cb and ioops.sendto_cb are at the same address so setting one and then checking the other does not work. In practice the code has no way to know and will assume it's calling sendto_cb() but is instead calling write_cb().
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35079?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I138d57843edc29000530bb7896bcb239002ecbec
Gerrit-Change-Number: 35079
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 30 Nov 2023 13:35:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria, laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35171?usp=email )
Change subject: soft_uart: check Rx/Tx state once in osmo_soft_uart_{rx,tx}_ubits()
......................................................................
Patch Set 3:
(2 comments)
Patchset:
PS3:
Btw, -EAGAIN doesn't sound like the best error code to return in that situation. EAGAIN usually means "just try again", but in this is case it seems to indicate that an action from the user (enabling the dev) is required.
File src/core/soft_uart.c:
https://gerrit.osmocom.org/c/libosmocore/+/35171/comment/117c1c1e_4d280446
PS3, Line 291: if (!suart->tx.running)
Move this above the other if condition, this one one can use tx_ubits(..., 0) to test if it is disabled by checking rc==-EAGAIN?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35171?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I70f93b3655eb21c2323e451052c40cd305c016c8
Gerrit-Change-Number: 35171
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 30 Nov 2023 12:58:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/35174?usp=email )
Change subject: test_call: codecs: test specific PT from MO to MT
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35174?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8fbabe242982441d676d09f4d0ed7557c8349f2c
Gerrit-Change-Number: 35174
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 30 Nov 2023 12:50:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment