pespin has submitted this change. (
https://gerrit.osmocom.org/c/libosmo-netif/+/29521 )
Change subject: osmux: Fix unwanted RTP marker bit upon rx of osmux seqnum wrap around
......................................................................
osmux: Fix unwanted RTP marker bit upon rx of osmux seqnum wrap around
The wrap around case was not properly considered in the condition
setting the Marker bit. Let's fix it.
Related: SYS#5987
Change-Id: I6e01f29a6239f930c9be2bcb2efe447e5de8fedf
---
M src/osmux.c
M tests/osmux/osmux_output_test.ok
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/osmux.c b/src/osmux.c
index 20b6798..ec5712d 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -156,7 +156,7 @@
* steady increase of delay
*/
rtph->marker = first_pkt &&
- (osmuxh->rtp_m || (osmuxh->seq != h->osmux_seq_ack + 1));
+ (osmuxh->rtp_m || (osmuxh->seq != ((h->osmux_seq_ack + 1) & 0xff)));
msgb_put(out_msg, sizeof(struct rtp_hdr));
diff --git a/tests/osmux/osmux_output_test.ok b/tests/osmux/osmux_output_test.ok
index f69c0a9..f08748f 100644
--- a/tests/osmux/osmux_output_test.ok
+++ b/tests/osmux/osmux_output_test.ok
@@ -108,7 +108,7 @@
===test_output_seqnum_wraparound===
sys={0.000000}, mono={0.000000}: clock_override_set
sys={0.000000}, mono={0.000000}: Sending osmux frame with seqnum=0
-sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5
+sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 enqueued=5
sys={0.040000}, mono={0.040000}: clock_override_add
sys={0.040000}, mono={0.040000}: dequeue: seq=51 ts=660 enqueued=4
sys={0.040000}, mono={0.040000}: dequeue: seq=52 ts=820 enqueued=3
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/29521
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I6e01f29a6239f930c9be2bcb2efe447e5de8fedf
Gerrit-Change-Number: 29521
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged