Browse Source

TT#189900 use explicit flag to enable kernel SSRC tracking

Zero SSRC are technically invalid, but the code accepts them as valid
and therefore sets up things like crypto contexts for zero SSRCs.
Consequently it's possible to have a zero SSRC first in the list of
SSRCs and other valid SSRCs later in the list, which means we can't use
the presence of a non-zero SSRC first in the list as a flag to determine
whether SSRC tracking is in use or not. Use an explicit flag instead.

Change-Id: I88736e5d6b0f66c58f8d675137231760951e7610
(cherry picked from commit 85ec6e2870)
mr10.5.2
Richard Fuchs 3 years ago
parent
commit
82b91bb2d1
3 changed files with 3 additions and 1 deletions
  1. +1
    -0
      daemon/media_socket.c
  2. +1
    -1
      kernel-module/xt_RTPENGINE.c
  3. +1
    -0
      kernel-module/xt_RTPENGINE.h

+ 1
- 0
daemon/media_socket.c View File

@ -1230,6 +1230,7 @@ static const char *kernelize_one(struct rtpengine_target_info *reti, GQueue *out
if (!reti->decrypt.cipher || !reti->decrypt.hmac)
return "decryption cipher or HMAC not supported by kernel module";
reti->track_ssrc = 1;
for (unsigned int u = 0; u < G_N_ELEMENTS(stream->ssrc_in); u++) {
if (stream->ssrc_in[u])
reti->ssrc[u] = htonl(stream->ssrc_in[u]->parent->h.ssrc);


+ 1
- 1
kernel-module/xt_RTPENGINE.c View File

@ -4562,7 +4562,7 @@ src_check_ok:
// Pass to userspace if SSRC has changed.
// Look for matching SSRC index if any SSRC were given
if (likely(g->target.ssrc[0])) {
if (likely(g->target.track_ssrc)) {
errstr = "SSRC mismatch";
for (ssrc_idx = 0; ssrc_idx < RTPE_NUM_SSRC_TRACKING; ssrc_idx++) {
if (g->target.ssrc[ssrc_idx] == rtp.header->ssrc)


+ 1
- 0
kernel-module/xt_RTPENGINE.h View File

@ -118,6 +118,7 @@ struct rtpengine_target_info {
stun:1,
rtp:1,
rtp_only:1,
track_ssrc:1,
do_intercept:1,
pt_filter:1,
non_forwarding:1, // empty src/dst addr


Loading…
Cancel
Save