pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved
osmux: dup in RTP pkt: check before applying queue flush due to Marker bit

We need to filter duplicate messages before checking the Mark bit and
returning 1 to tell the user to deliver the current batchset content.
Otherwise, a repeated RTP packet with an M bit would trigger delivery,
which is wrong.

Change-Id: I4a01b0935f112d650d8fc161b3389eda6c8e75ec
---
M src/osmux_input.c
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/osmux_input.c b/src/osmux_input.c
index 657abaf..10598d2 100644
--- a/src/osmux_input.c
+++ b/src/osmux_input.c
@@ -452,12 +452,6 @@
link->ndummy--;
}

- /* Init of talkspurt (RTP M marker bit) needs to be in the first AMR slot
- * of the OSMUX packet, enforce sending previous batch if required:
- */
- if (req->rtph->marker && req->circuit->nmsgs != 0)
- return 1;
-
/* Extra validation: check if this message already exists, should not
* happen but make sure we don't propagate duplicated messages.
*/
@@ -473,6 +467,12 @@
}
}

+ /* Init of talkspurt (RTP M marker bit) needs to be in the first AMR slot
+ * of the OSMUX packet, enforce sending previous batch if required:
+ */
+ if (req->rtph->marker && req->circuit->nmsgs != 0)
+ return 1;
+
/* First check if there is room for this message in the batch */
/* First in batch comes after the batch header: */
if (req->circuit->nmsgs == 0)

To view, visit change 30167. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I4a01b0935f112d650d8fc161b3389eda6c8e75ec
Gerrit-Change-Number: 30167
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged