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
pull/1546/head
Richard Fuchs 3 years ago
parent 6d26df0580
commit 85ec6e2870

@ -1231,6 +1231,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);

@ -4564,7 +4564,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)

@ -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