]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: conntrack: remove __nf_ct_unconfirmed_destroy
authorFlorian Westphal <fw@strlen.de>
Mon, 11 Apr 2022 11:01:23 +0000 (13:01 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 13 May 2022 16:52:17 +0000 (18:52 +0200)
commit40b53cb21e2eee02fa2a798a392fe61fb5f77774
tree8455a8b1512d2703f09e5dac3cc7ac19535a2e12
parentb3bc06cd4b5ca3e5b646039759f1f8a1e1683529
netfilter: conntrack: remove __nf_ct_unconfirmed_destroy

Its not needed anymore:

A. If entry is totally new, then the rcu-protected resource
must already have been removed from global visibility before call
to nf_ct_iterate_destroy.

B. If entry was allocated before, but is not yet in the hash table
   (uncofirmed case), genid gets incremented and synchronize_rcu() call
   makes sure access has completed.

C. Next attempt to peek at extension area will fail for unconfirmed
  conntracks, because ext->genid != genid.

D. Conntracks in the hash are iterated as before.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_helper.c
net/netfilter/nfnetlink_cttimeout.c