]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: connmark: ignore skbs with magic untracked conntrack objects
authorFlorian Westphal <fw@strlen.de>
Sat, 29 Oct 2016 01:01:50 +0000 (03:01 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 8 Nov 2016 22:53:36 +0000 (23:53 +0100)
commit12f80e413cb964af4d113f0acf6a828105d912c0
tree64f04efbfbc06e963cdc37e6ac22da7f33fe7808
parented1b61eeead28db8c81c3c79ef8b108b93f77fa4
netfilter: connmark: ignore skbs with magic untracked conntrack objects

The (percpu) untracked conntrack entries can end up with nonzero connmarks.

The 'untracked' conntrack objects are merely a way to distinguish INVALID
(i.e. protocol connection tracker says payload doesn't meet some
requirements or packet was never seen by the connection tracking code)
from packets that are intentionally not tracked (some icmpv6 types such as
neigh solicitation, or by using 'iptables -j CT --notrack' option).

Untracked conntrack objects are implementation detail, we might as well use
invalid magic address instead to tell INVALID and UNTRACKED apart.

Check skb->nfct for untracked dummy and behave as if skb->nfct is NULL.

Reported-by: XU Tianwen <evan.xu.tianwen@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_connmark.c