MT#55283 allow recording + blackhole

The kernel module must take the recording flag (`do_intercept`) into
account when `blackhole` is set, in order to make sure packets are not
dropped before they're passed to the recorder.

closes #1567

Change-Id: Ie2e0ad3d1941b5224fe823032e8349103c51e919
pull/1577/head
Richard Fuchs 3 years ago
parent 7e9a62dd8e
commit 202d26a729

@ -4568,10 +4568,10 @@ not_stun:
src_check_ok:
if (g->target.dtls && is_dtls(skb))
goto skip1;
if (g->target.non_forwarding) {
if (g->target.non_forwarding && !g->target.do_intercept) {
if (g->target.blackhole)
error_nf_action = NF_DROP;
goto skip1;
goto do_stats; // and drop
goto skip1; // pass to userspace
}
rtp.ok = 0;
@ -4714,6 +4714,7 @@ no_intercept:
}
}
do_stats:
if (atomic64_read(&g->stats_in.packets)==0)
atomic_set(&g->stats_in.tos,in_tos);

Loading…
Cancel
Save