Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35226?usp=email )
Change subject: ggsn: Fix restriction type on several template definitions
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35226?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I47a0c3fbf1b4078c2d8157b148330f7750cc3266
Gerrit-Change-Number: 35226
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 06 Dec 2023 14:06:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35176?usp=email )
Change subject: IuUP: Allow Initialization with set rem IP address and unset rem port
......................................................................
IuUP: Allow Initialization with set rem IP address and unset rem port
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
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 21 insertions(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
neels: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 994ce45..674c096 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -834,7 +834,8 @@
{
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
--
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: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35205?usp=email )
Change subject: IuUP: allow Initialization from any address if not yet set
......................................................................
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
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 43 insertions(+), 0 deletions(-)
Approvals:
neels: Looks good to me, but someone else must approve
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index b1bce97..6a726d4 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -835,6 +835,18 @@
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
--
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: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35181?usp=email )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: check_rtp_origin: drop special case for legacy IuUP hack
......................................................................
check_rtp_origin: drop special case for legacy IuUP hack
We have proper IuUP support and everything about this legacy hack should
be purged.
The purpose of this function is to validate that RTP is coming from the
expected address and port. To allow that legacy IuUP hack, which is no
longer needed, we punched a hole into this validation, by adding this
special case for loopback mode (suddenly we don't care who or what sends
RTP and bounce it back to anyone). So let's get rid of this hole that
was only needed for very early 3G voice hacking.
Instead, we permit RTP for IuUP Initialization regardless of the RTP
loopback/send/recv mode since I6c365559a7bd197349f0ea99f7a13b56a4bb580b
Related: SYS#6657
Change-Id: I158dd046fdfcb10392cde3de8cc88dd095a05b40
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 30 insertions(+), 23 deletions(-)
Approvals:
neels: 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 6a726d4..994ce45 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -847,29 +847,13 @@
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
- * 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. */
- LOGPCONN(conn->conn, DRTP, LOGL_ERROR,
- "In loopback mode and remote address 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;
- }
+ /* 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
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35181?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: I158dd046fdfcb10392cde3de8cc88dd095a05b40
Gerrit-Change-Number: 35181
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35176?usp=email )
Change subject: IuUP: Allow Initialization with set rem IP address and unset rem port
......................................................................
Patch Set 5: Code-Review+2
--
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: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 06 Dec 2023 14:03:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35176?usp=email )
Change subject: IuUP: Allow Initialization with set rem IP address and unset rem port
......................................................................
Patch Set 5: Code-Review+1
--
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: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 06 Dec 2023 13:55:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: dexter, laforge, neels, pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35205?usp=email )
Change subject: IuUP: allow Initialization from any address if not yet set
......................................................................
Patch Set 3: Code-Review+1
(1 comment)
Patchset:
PS3:
> This is an invitation to others to add a +1, and not be scared off by the long discussions.
ack, skipped reading the long open thread. the patch looks sane.
--
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: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 06 Dec 2023 13:51:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35235?usp=email )
Change subject: stream_cli: Fix opening sctp client socket if no local address set
......................................................................
stream_cli: Fix opening sctp client socket if no local address set
Properly call osmo_sock_init2_multiaddr2() to use default binding
address if user of osmo_stream_cli didn't set one on the object
through the API.
osmo_sock_init2_multiaddr2() was also borken under that scenario until
recently (see Depends below). Until now, users of osmo_stream for SCTP
(mainly libosmo-sccp) relied on always setting a proper local address to
overcome this limitation.
Depends: libosmocore.git Change-Id I2641fbaca6f477404b094dbc53c0c1a3dd3fd2fd
Related: OS#6279
Change-Id: I0d9d0e48690c915f7b51ad09f452e551e01368b5
---
M TODO-RELEASE
M src/stream_cli.c
2 files changed, 33 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc..2346129 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+libosmocore >1.9.0 working osmo_sock_init2_multiaddr2() without setting flag OSMO_SOCK_F_BIND
\ No newline at end of file
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 1e7ebeb..4f2963d 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -838,7 +838,9 @@
* \return negative on error, 0 on success */
int osmo_stream_cli_open(struct osmo_stream_cli *cli)
{
- int ret, fd = -1;
+ int ret, flags;
+ int fd = -1;
+ unsigned int local_addrcnt;
/* we are reconfiguring this socket, close existing first. */
if ((cli->flags & OSMO_STREAM_CLI_F_RECONF) && osmo_stream_cli_get_fd(cli) >= 0)
@@ -856,11 +858,18 @@
switch (cli->proto) {
#ifdef HAVE_LIBSCTP
case IPPROTO_SCTP:
+ local_addrcnt = cli->local_addrcnt;
+ flags = OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK;
+ if (cli->local_addrcnt > 0 || cli->local_port > 0) { /* explicit bind required? */
+ flags |= OSMO_SOCK_F_BIND;
+ /* If no local addr configured, use local_addr[0]=NULL by default when creating the socket. */
+ if (cli->local_addrcnt == 0)
+ local_addrcnt = 1;
+ }
ret = osmo_sock_init2_multiaddr2(cli->sk_domain, cli->sk_type, cli->proto,
- (const char **)cli->local_addr, cli->local_addrcnt, cli->local_port,
+ (const char **)cli->local_addr, local_addrcnt, cli->local_port,
(const char **)cli->addr, cli->addrcnt, cli->port,
- OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK,
- &cli->ma_pars);
+ flags, &cli->ma_pars);
break;
#endif
default:
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35235?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I0d9d0e48690c915f7b51ad09f452e551e01368b5
Gerrit-Change-Number: 35235
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged