dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/29591 )
Change subject: msgb: dont return a length when msgb->lXh is NULL
......................................................................
msgb: dont return a length when msgb->lXh is NULL
When any of l1h, l2h, l2h or l4h is set to NULL (which is the default
for newly allocated message buffers). Then the msgb_lXhlen() functions
will return the value of msgb->tail. This is not logical. When the
msgb->lXh pointers are not used then a mgsb_lXhlen() should return 0 and
not a very high random number.
Change-Id: I1795c559f190713ebbabfbabf3453ab77da46a49
Related: OS#5645
---
M include/osmocom/core/msgb.h
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/91/29591/1
diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index 117fcb0..8535e04 100644
--- a/include/osmocom/core/msgb.h
+++ b/include/osmocom/core/msgb.h
@@ -144,6 +144,8 @@
*/
static inline unsigned int msgb_l1len(const struct msgb *msgb)
{
+ if (!msgb->l1h)
+ return 0;
return msgb->tail - (uint8_t *)msgb_l1(msgb);
}
@@ -156,6 +158,8 @@
*/
static inline unsigned int msgb_l2len(const struct msgb *msgb)
{
+ if (!msgb->l2h)
+ return 0;
return msgb->tail - (uint8_t *)msgb_l2(msgb);
}
@@ -168,6 +172,8 @@
*/
static inline unsigned int msgb_l3len(const struct msgb *msgb)
{
+ if (!msgb->l3h)
+ return 0;
return msgb->tail - (uint8_t *)msgb_l3(msgb);
}
@@ -180,6 +186,8 @@
*/
static inline unsigned int msgb_l4len(const struct msgb *msgb)
{
+ if (!msgb->l4h)
+ return 0;
return msgb->tail - (uint8_t *)msgb_sms(msgb);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29591
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1795c559f190713ebbabfbabf3453ab77da46a49
Gerrit-Change-Number: 29591
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/29589
to look at the new patch set (#3).
Change subject: Get rid of separate rtp_port field
......................................................................
Get rid of separate rtp_port field
Let's use the port part of the struct mgcp_rtp_end->addr field instead
of keeping it separate. This makes it easier passing around and
using/checking the RTP remote address + port, and avoids confusion
having to check stuff outside of the address, with its port part
potentially unset.
Change-Id: I294eb5d85fae79bf62d36eb9e818426e187d442c
---
M include/osmocom/mgcp/mgcp.h
M include/osmocom/mgcp/mgcp_network.h
M src/libosmo-mgcp/mgcp_conn.c
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
M src/libosmo-mgcp/mgcp_sdp.c
M tests/mgcp/mgcp_test.c
9 files changed, 50 insertions(+), 70 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/89/29589/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29589
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I294eb5d85fae79bf62d36eb9e818426e187d442c
Gerrit-Change-Number: 29589
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-mgw/+/29589 )
Change subject: Get rid of separate rtp_port field
......................................................................
Get rid of separate rtp_port field
Let's use the port part of the struct mgcp_rtp_end->addr field instead
of keeping it separate. This makes it easier passing around and
using/checking the RTP remote address + port, and avoids confusion
having to check stuff outside of the address, with its port part
potentially unset.
Change-Id: I294eb5d85fae79bf62d36eb9e818426e187d442c
---
M include/osmocom/mgcp/mgcp.h
M include/osmocom/mgcp/mgcp_network.h
M src/libosmo-mgcp/mgcp_conn.c
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
M src/libosmo-mgcp/mgcp_sdp.c
M tests/mgcp/mgcp_test.c
9 files changed, 50 insertions(+), 70 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/89/29589/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29589
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I294eb5d85fae79bf62d36eb9e818426e187d442c
Gerrit-Change-Number: 29589
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-mgw/+/29590 )
Change subject: osmux: Use available API to check if remote end is known
......................................................................
osmux: Use available API to check if remote end is known
Since recently the port is guaranteed to be placed at
CRCX/MDCX in the sockaddr, hence we can check it using the API instead
of checking manually only for the address part.
In osmux_send_dummy() we actually fix a bug where an in_addr was being
compared against a struct sockaddr.
Change-Id: I736e7f4c51e577d8eb0b96bc776f984f928b6d27
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 2 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/90/29590/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29590
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I736e7f4c51e577d8eb0b96bc776f984f928b6d27
Gerrit-Change-Number: 29590
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29589 )
Change subject: WIP: Get rid of separate rtp_port field
......................................................................
Patch Set 1:
(1 comment)
File src/libosmo-mgcp/mgcp_osmux.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-osmo-mgw-lint-554):
https://gerrit.osmocom.org/c/osmo-mgw/+/29589/comment/a15d30d2_adf32b0c
PS1, Line 655: return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, (char*)osmuxh, buf_len);
"(foo*)" should be "(foo *)"
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29589
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I294eb5d85fae79bf62d36eb9e818426e187d442c
Gerrit-Change-Number: 29589
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 04 Oct 2022 12:43:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29590 )
Change subject: osmux: Use available API to check if remote end is known
......................................................................
osmux: Use available API to check if remote end is known
Since recently the port is guaranteed to be placed at
CRCX/MDCX in the sockaddr, hence we can check it using the API instead
of checking manually only for the address part.
In osmux_send_dummy() we actually fix a bug where an in_addr was being
compared against a struct sockaddr.
Change-Id: I736e7f4c51e577d8eb0b96bc776f984f928b6d27
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 2 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/90/29590/1
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index b5a2c57..cd8881f 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -504,7 +504,6 @@
* overlapping RTP SSRC traveling to the BTSes behind the BSC,
* similarly, for flows traveling to the MSC.
*/
- struct in6_addr addr_unset = {};
static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);
uint16_t osmux_dummy = endp->trunk->cfg->osmux_dummy;
@@ -517,10 +516,7 @@
}
/* Wait until we have the connection information from MDCX */
- if (memcmp(&conn->end.addr, &addr_unset,
- conn->end.addr.u.sa.sa_family == AF_INET6 ?
- sizeof(struct in6_addr) :
- sizeof(struct in_addr)) == 0) {
+ if (!mgcp_rtp_end_remote_addr_available(&conn->end)) {
LOGPCONN(conn->conn, DOSMUX, LOGL_INFO,
"Osmux remote address/port still unknown\n");
return -1;
@@ -622,7 +618,6 @@
char ipbuf[INET6_ADDRSTRLEN];
struct osmux_hdr *osmuxh;
int buf_len;
- struct in_addr addr_unset = {};
/*! The dummy packet will not be sent via the actual OSMUX connection,
* instead it is sent out of band to port where the remote OSMUX
@@ -634,7 +629,7 @@
* approach is simple though. */
/* Wait until we have the connection information from MDCX */
- if (memcmp(&conn->end.addr, &addr_unset, sizeof(addr_unset)) == 0)
+ if (!mgcp_rtp_end_remote_addr_available(&conn->end))
return 0;
if (endp_osmux_state_check(endp, conn, true) < 0)
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29590
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I736e7f4c51e577d8eb0b96bc776f984f928b6d27
Gerrit-Change-Number: 29590
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin, fixeria.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/29576
to look at the new patch set (#4).
Change subject: osmux: Close osmux socket when bts is freed
......................................................................
osmux: Close osmux socket when bts is freed
Related: SYS#5987
Change-Id: Ibd3faa33b28d45048c340b177f13d5685f41a784
---
M src/common/osmux.c
1 file changed, 12 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/76/29576/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29576
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibd3faa33b28d45048c340b177f13d5685f41a784
Gerrit-Change-Number: 29576
Gerrit-PatchSet: 4
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-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/29576
to look at the new patch set (#3).
Change subject: osmux: Close osmux socket when bts is freed
......................................................................
osmux: Close osmux socket when bts is freed
Related: SYS#5987
Change-Id: Ibd3faa33b28d45048c340b177f13d5685f41a784
---
M src/common/osmux.c
1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/76/29576/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29576
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibd3faa33b28d45048c340b177f13d5685f41a784
Gerrit-Change-Number: 29576
Gerrit-PatchSet: 3
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset