From 6b76b492e6df05fe5ecd5c851934fbd46f02c580 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 4 Sep 2024 10:39:01 -0400 Subject: [PATCH] MT#55283 trigger rekernel for SSRC-less streams If a stream has been pushed to the kernel from anything other than RTP, even though RTP is expected, we get a forwarding entries without any SSRCs. This is valid, but once actual RTP is received, it needs to be passed on to user space, so that SSRC contexts can be set up. Possible fix for #1855 Change-Id: I51b82d3cf79cf66780fdde154bebe56e0f43174b (cherry picked from commit a0b705eef9bc92c413074224b833584d60e7d93c) (cherry picked from commit c3dd3dc55860a95b4c6f4b0ea7883f343d2d6d6c) (cherry picked from commit b3f2685845119097c2f946be01de1d8375894472) --- daemon/media_socket.c | 1 + kernel-module/xt_RTPENGINE.c | 2 +- kernel-module/xt_RTPENGINE.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 025977b63d..177c8a090b 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1495,6 +1495,7 @@ static const char *kernelize_one(struct rtpengine_target_info *reti, GQueue *out if (proto_is_rtp(media->protocol)) { reti->rtp = 1; + reti->ssrc_req = 1; if (!MEDIA_ISSET(media, TRANSCODING)) { reti->rtcp_fw = 1; if (media->protocol->avpf) diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 0389aaa027..406493d010 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -5318,7 +5318,7 @@ static unsigned int rtpengine46(struct sk_buff *skb, struct sk_buff *oskb, // Look for matching SSRC index if any SSRC were given ssrc_idx = target_find_ssrc(g, rtp.rtp_header->ssrc); errstr = "SSRC mismatch"; - if (ssrc_idx == -2) + if (ssrc_idx == -2 || (ssrc_idx == -1 && g->target.ssrc_req)) goto out_error; pkt_idx = rtp_packet_index(&g->decrypt_rtp, &g->target.decrypt, rtp.rtp_header, ssrc_idx); diff --git a/kernel-module/xt_RTPENGINE.h b/kernel-module/xt_RTPENGINE.h index 079dc6507c..4f87494068 100644 --- a/kernel-module/xt_RTPENGINE.h +++ b/kernel-module/xt_RTPENGINE.h @@ -123,6 +123,7 @@ struct rtpengine_target_info { dtls:1, stun:1, rtp:1, + ssrc_req:1, rtp_only:1, track_ssrc:1, rtcp:1,