Browse Source

TT#14008 fix kernel RTCP mux test

AVPF extended (non-compound) RTCP packets don't satisy the same RTP-like
header rules as regular RTCP compound packets, therefore we move the
RTCP mux test ahead of the RTP header parsing test.

Change-Id: Iecb3895d16796095f572c2eda2efa0a7a0dc69e7
pull/1373/head
Richard Fuchs 4 years ago
parent
commit
4fa48df952
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      kernel-module/xt_RTPENGINE.c

+ 11
- 6
kernel-module/xt_RTPENGINE.c View File

@ -4149,10 +4149,15 @@ static inline int srtp_decrypt(struct re_crypto_context *c,
return c->cipher->decrypt(c, s, r, pkt_idx);
}
static inline int is_muxed_rtcp(struct rtp_parsed *r) {
if (r->header->m_pt < 194)
static inline int is_muxed_rtcp(struct sk_buff *skb) {
// XXX shared code
unsigned char m_pt;
if (skb->len < 8) // minimum RTCP size
return 0;
m_pt = skb->data[1];
if (m_pt < 194)
return 0;
if (r->header->m_pt > 223)
if (m_pt > 223)
return 0;
return 1;
}
@ -4423,6 +4428,9 @@ src_check_ok:
if (!g->target.rtp)
goto not_rtp;
if (g->target.rtcp_mux && is_muxed_rtcp(skb))
goto skip1;
parse_rtp(&rtp, skb);
if (!rtp.ok) {
if (g->target.rtp_only)
@ -4430,9 +4438,6 @@ src_check_ok:
goto not_rtp;
}
if (g->target.rtcp_mux && is_muxed_rtcp(&rtp))
goto skip1;
rtp_pt_idx = rtp_payload_type(rtp.header, &g->target);
// Pass to userspace if SSRC has changed.


Loading…
Cancel
Save