+120
−57
+3
−11
Loading
When using nf_conncount infrastructure for non-confirmed connections a duplicated track is possible due to an optimization introduced since commit d2659299 ("netfilter: nf_conncount: reduce unnecessary GC"). In order to fix this introduce a new conncount API that receives directly an sk_buff struct. It fetches the tuple and zone and the corresponding ct from it. It comes with both existing conncount variants nf_conncount_count_skb() and nf_conncount_add_skb(). In addition remove the old API and adjust all the users to use the new one. This way, for each sk_buff struct it is possible to check if there is a ct present and already confirmed. If so, skip the add operation. Fixes: d2659299 ("netfilter: nf_conncount: reduce unnecessary GC") Signed-off-by:Fernando Fernandez Mancera <fmancera@suse.de> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>