• Florian Westphal's avatar
    netfilter: connmark: ignore skbs with magic untracked conntrack objects · fb9c9649
    Florian Westphal authored
    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: default avatarXU Tianwen <evan.xu.tianwen@gmail.com>
    Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    fb9c9649
xt_connmark.c 4.41 KB