Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/29572 )
Change subject: osmux: Log remote address upon rx of osmux pkt
......................................................................
Patch Set 1:
(1 comment)
File src/common/osmux.c:
https://gerrit.osmocom.org/c/osmo-bts/+/29572/comment/7de713a1_5bff27ef
PS1, Line 267: osmo_sockaddr_to_str_buf
Why not just using osmo_sockaddr_to_str()?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29572
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I391bc02a16eae1602680cb96128252f262852e14
Gerrit-Change-Number: 29572
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Oct 2022 12:04:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/29588 )
Change subject: coverity: fix prepare_source_Osmocom.sh terminating early
......................................................................
coverity: fix prepare_source_Osmocom.sh terminating early
Since [1] was merged this script is executed with '-xe' making it
fail immediately if a command returns a non-zero code. grep may
return 1 if pattern is not found, so let's suspend it.
Change-Id: I21a01478b64015fd699ed31634bf2fb1dc8f6750
Fixes: [1] Icf6546271a01cd9a3dab1ce0d1bc02807d08ad85
---
M coverity/prepare_source_Osmocom.sh
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/88/29588/1
diff --git a/coverity/prepare_source_Osmocom.sh b/coverity/prepare_source_Osmocom.sh
index 63fbea0..526e9d3 100755
--- a/coverity/prepare_source_Osmocom.sh
+++ b/coverity/prepare_source_Osmocom.sh
@@ -65,7 +65,7 @@
# We want to compile tests, but not execute them. Using 'noinst_PROGRAMS'
# instead of 'check_PROGRAMS' allows building test binaries during 'make all'.
for proj in $PROJECTS; do
- files="$(git -C $proj grep -l check_PROGRAMS)"
+ files="$(git -C $proj grep -l check_PROGRAMS)" || true
if [ -n "$files" ]; then
(cd $proj && sed -i "s/check_PROGRAMS/noinst_PROGRAMS/" $files)
fi
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29588
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I21a01478b64015fd699ed31634bf2fb1dc8f6750
Gerrit-Change-Number: 29588
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/29586
to look at the new patch set (#2).
Change subject: socket: Introduce API osmo_sockaddr_is_any
......................................................................
socket: Introduce API osmo_sockaddr_is_any
Change-Id: I2810a889fc14052d0e0be6a2b500ad4e5088ffa9
---
M TODO-RELEASE
M include/osmocom/core/socket.h
M src/socket.c
3 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/29586/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29586
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2810a889fc14052d0e0be6a2b500ad4e5088ffa9
Gerrit-Change-Number: 29586
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29565 )
Change subject: osmux: Match remote address in osmux_conn_lookup()
......................................................................
osmux: Match remote address in osmux_conn_lookup()
Depends: libosmo-netif.git I95433b18802f73fa70e758f4aa02128eee940d88
Change-Id: Ia717efa5f68e9412b86ef44a4c42a0715ff0e469
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 14 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index abd4f32..9187007 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -251,7 +251,8 @@
{
struct mgcp_endpoint *endp;
struct mgcp_conn *conn = NULL;
- struct mgcp_conn_rtp * conn_rtp;
+ struct mgcp_conn_rtp *conn_rtp;
+ struct osmux_handle *h;
int i;
for (i = 0; i < trunk->number_endpoints; i++) {
@@ -266,7 +267,18 @@
if (!mgcp_conn_rtp_is_osmux(conn_rtp))
continue;
- /* FIXME: Match remote address! */
+ /* Current implementation sets remote address & port for
+ * the conn based on src address received on the socket
+ * for the CID, in order to workaround NATs.
+ * Once the conn is fully established (remote address is
+ * known), validate the remote address doesn't change: */
+ if (conn_rtp->osmux.state == OSMUX_STATE_ENABLED) {
+ h = osmux_xfrm_input_get_deliver_cb_data(conn_rtp->osmux.in);
+ if (osmo_sockaddr_cmp(&h->rem_addr, rem_addr) != 0)
+ continue;
+ }
+ /* else: select based on CID only, to learn rem addr in NAT-based scenarios.
+ * FIXME: This should be configurable, have some sort of "osmux nat (on|off)" */
if (conn_rtp->osmux.local_cid == local_cid)
return conn_rtp;
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29565
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia717efa5f68e9412b86ef44a4c42a0715ff0e469
Gerrit-Change-Number: 29565
Gerrit-PatchSet: 4
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
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29568 )
Change subject: osmux: Unify rtp_conn osmux type into a single type
......................................................................
osmux: Unify rtp_conn osmux type into a single type
There's no need to separate between BSS and CN side nowadays, the
different types are used nowehere. This separation dates from
osmo-bsc-nat code days.
Change-Id: I65effeddf033eb1955553e8d659c593b4e67f7bc
---
M include/osmocom/mgcp/mgcp_conn.h
M src/libosmo-mgcp/mgcp_iuup.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_osmux.c
M src/libosmo-mgcp/mgcp_protocol.c
5 files changed, 7 insertions(+), 11 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index d9b38c0..7ac40ab 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -46,8 +46,7 @@
/* Specific rtp connection type (see struct mgcp_conn_rtp) */
enum mgcp_conn_rtp_type {
MGCP_RTP_DEFAULT = 0,
- MGCP_OSMUX_BSC,
- MGCP_OSMUX_BSC_NAT,
+ MGCP_RTP_OSMUX,
MGCP_RTP_IUUP,
};
@@ -224,7 +223,7 @@
/* Was conn configured to handle Osmux? */
static inline bool mgcp_conn_rtp_is_osmux(const struct mgcp_conn_rtp *conn) {
- return conn->type == MGCP_OSMUX_BSC || conn->type == MGCP_OSMUX_BSC_NAT;
+ return conn->type == MGCP_RTP_OSMUX;
}
/* Was conn configured to handle Osmux? */
diff --git a/src/libosmo-mgcp/mgcp_iuup.c b/src/libosmo-mgcp/mgcp_iuup.c
index 142b002..48e4ce7 100644
--- a/src/libosmo-mgcp/mgcp_iuup.c
+++ b/src/libosmo-mgcp/mgcp_iuup.c
@@ -342,8 +342,7 @@
return bridge_iuup_to_iuup_peer(conn_rtp_src, conn_rtp_dst, irp);
case MGCP_RTP_DEFAULT:
return bridge_iuup_to_rtp_peer(conn_rtp_src, conn_rtp_dst, irp);
- case MGCP_OSMUX_BSC:
- case MGCP_OSMUX_BSC_NAT:
+ case MGCP_RTP_OSMUX:
default:
LOGPCONN(conn_rtp_src->conn, DRTP, LOGL_ERROR,
"Forward of IuUP payload to RTP connection type %u not supported!\n",
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index a3c245a..5246160 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1013,10 +1013,9 @@
"using mgcp_send() to forward data directly\n");
return mgcp_send(endp, proto == MGCP_PROTO_RTP,
mc->from_addr, msg, conn_src, conn_dst);
- case MGCP_OSMUX_BSC_NAT:
- case MGCP_OSMUX_BSC:
+ case MGCP_RTP_OSMUX:
LOGPENDP(endp, DRTP, LOGL_DEBUG,
- "endpoint type is MGCP_OSMUX_BSC_NAT, "
+ "endpoint type is MGCP_RTP_OSMUX, "
"using osmux_xfrm_to_osmux() to forward data through OSMUX\n");
return osmux_xfrm_to_osmux((char*)msgb_data(msg), msgb_length(msg), conn_dst);
case MGCP_RTP_IUUP:
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 85ba655b..abd4f32 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -611,7 +611,7 @@
conn->osmux.local_cid = (uint8_t) osmux_cid;
conn->osmux.local_cid_allocated = true;
- conn->type = MGCP_OSMUX_BSC;
+ conn->type = MGCP_RTP_OSMUX;
return osmux_cid;
}
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 711ca31..79fbc53 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -150,8 +150,7 @@
switch (conn->type) {
case MGCP_RTP_DEFAULT:
- case MGCP_OSMUX_BSC:
- case MGCP_OSMUX_BSC_NAT:
+ case MGCP_RTP_OSMUX:
case MGCP_RTP_IUUP:
break;
default:
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29568
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I65effeddf033eb1955553e8d659c593b4e67f7bc
Gerrit-Change-Number: 29568
Gerrit-PatchSet: 2
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
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29531 )
Change subject: osmux: Drop logging of osmux internal counters
......................................................................
osmux: Drop logging of osmux internal counters
This way we have no more access to internal osmux structures.
Moreover, we already have similar information in our rate_ctrs, so
there's no need to print those there.
Change-Id: I853e118f843070ea29b19e1b0fe56b52f267437a
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 0 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 5c3ddbf..b8a1c4b 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -136,13 +136,6 @@
LOGP(DOSMUX, LOGL_INFO,
"Releasing unused osmux handle for %s\n",
osmo_sockaddr_to_str(&h->rem_addr));
- LOGP(DOSMUX, LOGL_INFO, "Stats: "
- "input RTP msgs: %u bytes: %"PRIu64" "
- "output osmux msgs: %u bytes: %"PRIu64"\n",
- in->stats.input_rtp_msgs,
- in->stats.input_rtp_bytes,
- in->stats.output_osmux_msgs,
- in->stats.output_osmux_bytes);
llist_del(&h->head);
TALLOC_FREE(h->in);
talloc_free(h);
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29531
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I853e118f843070ea29b19e1b0fe56b52f267437a
Gerrit-Change-Number: 29531
Gerrit-PatchSet: 2
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