From e7f00c77119ad54ceeb87be025b6e3ac2f0c81b0 Mon Sep 17 00:00:00 2001 From: Robin Geuze Date: Tue, 28 May 2019 09:24:18 +0000 Subject: sync-notrack: Apply userspace filter on resync with internal cache disabled Always apply the userspace filter when doing a direct sync from the kernel when internal cache is disabled, since a dump does not apply a kernelspace filter. Signed-off-by: Robin Geuze Signed-off-by: Pablo Neira Ayuso --- src/sync-notrack.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sync-notrack.c') diff --git a/src/sync-notrack.c b/src/sync-notrack.c index 1b53e1b..b765c1a 100644 --- a/src/sync-notrack.c +++ b/src/sync-notrack.c @@ -72,6 +72,9 @@ static int kernel_resync_cb(enum nf_conntrack_msg_type type, { struct nethdr *net; + if (ct_filter_conntrack(ct, 1)) + return NFCT_CB_CONTINUE; + net = BUILD_NETMSG_FROM_CT(ct, NET_T_STATE_CT_NEW); multichannel_send(STATE_SYNC(channel), net); -- cgit v1.2.3