Skip to content

Commit 119c790

Browse files
Florian Westphalummakynes
authored andcommitted
netfilter: conntrack: remove flowtable early-drop test
Not sure why this special case exists. Early drop logic (which kicks in when conntrack table is full) should be independent of flowtable offload and only consider assured bit (i.e., two-way traffic was seen). flowtable entries hold a reference to the conntrack entry (struct nf_conn) that has been offloaded. The conntrack use count is not decremented until after the entry is free'd. This change therefore will not result in exceeding the conntrack table limit. It does allow early-drop of tcp flows even when they've been offloaded, but only if they have been offloaded before syn-ack was received or after at least one peer has sent a fin. Currently 'fin' packet reception already stops offloading, so this should not impact offloading either. Cc: Vlad Buslov <vladbu@nvidia.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent f9a6e7f commit 119c790

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

net/netfilter/nf_conntrack_core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,6 @@ static bool gc_worker_can_early_drop(const struct nf_conn *ct)
14401440
const struct nf_conntrack_l4proto *l4proto;
14411441
u8 protonum = nf_ct_protonum(ct);
14421442

1443-
if (test_bit(IPS_OFFLOAD_BIT, &ct->status) && protonum != IPPROTO_UDP)
1444-
return false;
14451443
if (!test_bit(IPS_ASSURED_BIT, &ct->status))
14461444
return true;
14471445

0 commit comments

Comments
 (0)