]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conncount: fix unexpected permanent node of list.
authorTaehee Yoo <ap420073@gmail.com>
Sun, 4 Nov 2018 18:44:39 +0000 (03:44 +0900)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 12 Nov 2018 15:05:01 +0000 (16:05 +0100)
commitde13045d56160a1ecdfc5961142de4de7d039290
treeba33fdfa2e401242bdfc79db4c7334cb15ebc340
parentc92ed326c54090cff71ec7fee3a1d0578978886c
netfilter: nf_conncount: fix unexpected permanent node of list.

When list->count is 0, the list is deleted by GC. But list->count is
never reached 0 because initial count value is 1 and it is increased
when node is inserted. So that initial value of list->count should be 0.

Originally GC always finds zero count list through deleting node and
decreasing count. However, list may be left empty since node insertion
may fail eg.  allocaton problem. In order to solve this problem, GC
routine also finds zero count list without deleting node.

Fixes: 05f428174297 ("netfilter: nf_conncount: Switch to plain list")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conncount.c