pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/30167 )


Change subject: osmux: dup in RTP pkt: check before applying queue flush due to 
Marker bit
......................................................................

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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/67/30167/1

diff --git a/src/osmux_input.c b/src/osmux_input.c
index c2a96af..7387ab0 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 https://gerrit.osmocom.org/c/libosmo-netif/+/30167
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I4a01b0935f112d650d8fc161b3389eda6c8e75ec
Gerrit-Change-Number: 30167
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to