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
(cherry picked from commit 4fa48df952)
mr9.5.2
Richard Fuchs 4 years ago
parent 922da26988
commit faa95000b0

@ -4034,10 +4034,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;
}
@ -4296,6 +4301,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)
@ -4303,9 +4311,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