]> 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)
commitf7acd0d23bf2594f77483b0ce086a9cd8514e7d8
treeba33fdfa2e401242bdfc79db4c7334cb15ebc340
parent7da8e7b5a71bd71578e25d119e76ad60f02d5459
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: befa94c74ca5 ("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