]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nfqueue: don't use prev pointer
authorFlorian Westphal <fw@strlen.de>
Fri, 9 Oct 2015 11:10:37 +0000 (13:10 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 13 Oct 2015 10:03:24 +0000 (12:03 +0200)
commit5a0e5d9e08164a7ea9bf923272559ad6a115a457
tree46d2704f24f8f975edc25da2b18797926afe6af1
parent2cc4ffe4be2a4a178a5b0f55364383adea544172
netfilter: nfqueue: don't use prev pointer

Usage of -prev seems buggy.  While packet was out our hook cannot be
removed but we have no way to know if the previous one is still valid.

So better not use ->prev at all.  Since NF_REPEAT just asks to invoke
same hook function again, just do so, and continue with nf_interate
if we get an ACCEPT verdict.

A side effect of this change is that if nf_reinject(NF_REPEAT) causes
another REPEAT we will now drop the skb instead of a kernel loop.

However, NF_REPEAT loops would be a bug so this should not happen anyway.

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