]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: conntrack: make conntrack userspace helpers work again
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 24 May 2020 17:52:10 +0000 (19:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 25 May 2020 18:39:14 +0000 (20:39 +0200)
commitd89b9edcdb7864446f828598746647c7276e6b18
treece5e9cae290304c6c3c0773966b5814349cb9756
parent771dae035fe2e708ec7ca32c950a7cedfd238e79
netfilter: conntrack: make conntrack userspace helpers work again

Florian Westphal says:

"Problem is that after the helper hook was merged back into the confirm
one, the queueing itself occurs from the confirm hook, i.e. we queue
from the last netfilter callback in the hook-list.

Therefore, on return, the packet bypasses the confirm action and the
connection is never committed to the main conntrack table.

To fix this there are several ways:
1. revert the 'Fixes' commit and have a extra helper hook again.
   Works, but has the drawback of adding another indirect call for
   everyone.

2. Special case this: split the hooks only when userspace helper
   gets added, so queueing occurs at a lower priority again,
   and normal enqueue reinject would eventually call the last hook.

3. Extend the existing nf_queue ct update hook to allow a forced
   confirmation (plus run the seqadj code).

This goes for 3)."

Fixes: 64836064c323a ("netfilter: conntrack: remove helper hook again")
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_core.c