pespin has submitted this change. ( 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(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 242f907..de0bc38 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: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/29611 )
Change subject: icE1usb fw: Add Notify PPS on Carrier Detect option
......................................................................
Patch Set 2:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-e1-hardware/+/29611/comment/975b57c4_7e1d…
PS2, Line 10: actually support PPS on CD for USB-CDC devices :(
> I guess this is due to the fact that one generally assumes USB devices with no real CPU interrupt (j […]
No, because it's supported on FTDI or PL2023 USB->Serial for instance.
It's just that no one bother to implement it for USB CDC ACM devices.
(And yes, the jitter / precision isn't great, but over long periods it's not all that bad)
Patchset:
PS2:
> well, it is the kernel coding style to have "} else {". […]
Yeah I know and in general I agree, but some times depending on surrounding code, it just doesn't "look" nice and makes it harder to read and so I don't adhere strictly. Just my 2ct anyway.
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/29611
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ie5d163434323a23912228003add9870fafefedf9
Gerrit-Change-Number: 29611
Gerrit-PatchSet: 2
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 04 Oct 2022 17:23:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: tnt <tnt(a)246tNt.com>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29590 )
Change subject: osmux: Use available API to check if remote end is known
......................................................................
Patch Set 3: Code-Review+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: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Oct 2022 17:17:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment