]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conncount: don't skip eviction when age is negative
authorFlorian Westphal <fw@strlen.de>
Fri, 28 Dec 2018 00:24:43 +0000 (01:24 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 29 Dec 2018 01:45:18 +0000 (02:45 +0100)
commitcc1f9433da82804406d7e778a27a8517492fa6fe
tree42873aa500164d5b8e21f048390cd5885476723d
parent93b73edf95f5e91fad9c132a9acbc4bc23851a68
netfilter: nf_conncount: don't skip eviction when age is negative

age is signed integer, so result can be negative when the timestamps
have a large delta.  In this case we want to discard the entry.

Instead of using age >= 2 || age < 0, just make it unsigned.

Fixes: 3b17023972d79 ("netfilter: nf_conncount: fix garbage collection confirm race")
Reviewed-by: Shawn Bohrer <sbohrer@cloudflare.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conncount.c