pespin has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/21/29521/1
diff --git a/src/osmux.c b/src/osmux.c
index 36be31a..28dab45 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
To view, visit change 29521. To unsubscribe, or for help writing mail filters, visit settings.