From 7c1930af2a9501144e46bfa85d84316bb15b1d81 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 6 Apr 2023 17:31:48 -0400 Subject: [PATCH] TT#146201 don't special-case RTCP rule Don't explicitly set the "non forwarding" flag just because an RTCP stream is being kernelised. The distinction between RTP and RTCP, together with zero-length outputs setting "non forwarding" automatically takes care of it. Change-Id: Ie363fc369b7ace21ed172a0ec141c83afd1ba21b --- daemon/media_socket.c | 6 ------ kernel-module/xt_RTPENGINE.c | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index de3caeadd..58bc1e411 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1420,12 +1420,6 @@ static const char *kernelize_one(struct rtpengine_target_info *reti, GQueue *out if (sink_handler) sink_handler->kernel_output_idx = -1; - if (!PS_ISSET(stream, RTP)) { - if (PS_ISSET(stream, RTCP) && PS_ISSET(stream, STRICT_SOURCE)) - non_forwarding = true; // use the kernel's source checking capability - else - return NULL; - } if (MEDIA_ISSET(media, BLACKHOLE)) blackhole = true; else if (!sink_handler) diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 7928aa192..89659f123 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -5319,6 +5319,10 @@ static unsigned int rtpengine46(struct sk_buff *skb, struct rtpengine_table *t, // output start_idx = 0; end_idx = g->num_rtp_destinations; + + if (start_idx == end_idx) + goto out; // pass to userspace + for (i = start_idx; i < end_idx; i++) { struct rtpengine_output *o = &g->outputs[i]; // do we need a copy?