MT#55283 allow RTCP APP for peer verification

Closes #2057

Change-Id: I069d12d8c7fd7ec36b77f1394fd9e8b928cdfd46
rfuchs/2057
Richard Fuchs 3 months ago
parent 256ad7b588
commit d3ef4edfcf

@ -3128,7 +3128,7 @@ static bool media_packet_address_check(struct packet_handler_ctx *phc)
// confirmation purposes when needed. This is regardless of whether rtcp-mux
// is enabled or not.
if (!phc->mp.sfd->confirmed && PS_ISSET(phc->mp.stream, RTP)) {
if (rtcp_demux_is_rtcp(&phc->s)) {
if (rtcp_demux_is_rtcp(&phc->s) && rtcp_pt(&phc->s) != RTCP_PT_APP) {
ilog(LOG_DEBUG | LOG_FLAG_LIMIT, "Ignoring stray RTCP packet from %s%s%s for "
"peer address confirmation purposes",
FMT_M(endpoint_print_buf(&phc->mp.fsin)));

@ -36,15 +36,6 @@
#define SRTCP_R_LENGTH 6
#endif
#define RTCP_PT_SR 200 /* sender report */
#define RTCP_PT_RR 201 /* receiver report */
#define RTCP_PT_SDES 202 /* source description */
#define RTCP_PT_BYE 203 /* bye */
#define RTCP_PT_APP 204 /* application specific */
#define RTCP_PT_RTPFB 205 /* transport layer feedback message (RTP/AVPF) */
#define RTCP_PT_PSFB 206 /* payload-specific feedback message (RTP/AVPF) */
#define RTCP_PT_XR 207
#define SDES_TYPE_END 0
#define SDES_TYPE_CNAME 1
#define SDES_TYPE_NAME 2

@ -6,6 +6,16 @@
#include "compat.h"
#define RTCP_PT_SR 200 /* sender report */
#define RTCP_PT_RR 201 /* receiver report */
#define RTCP_PT_SDES 202 /* source description */
#define RTCP_PT_BYE 203 /* bye */
#define RTCP_PT_APP 204 /* application specific */
#define RTCP_PT_RTPFB 205 /* transport layer feedback message (RTP/AVPF) */
#define RTCP_PT_PSFB 206 /* payload-specific feedback message (RTP/AVPF) */
#define RTCP_PT_XR 207
struct rtcp_header {
#if G_BYTE_ORDER == G_BIG_ENDIAN
unsigned version:2; /**< packet type */
@ -44,6 +54,9 @@ INLINE bool rtcp_demux_is_rtcp(const str *s) {
return true;
}
INLINE unsigned char rtcp_pt(const str *s) {
struct rtcp_packet *rtcp = (void *) s->s;
return rtcp->header.pt;
}
#endif

Loading…
Cancel
Save