netfilter: ctnetlink: fix dump of the expect mask attribute
authorFlorian Westphal <fw@strlen.de>
Mon, 15 Mar 2021 10:31:09 +0000 (11:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:31:59 +0000 (14:31 +0200)
commitee39ee5f437c1741cb9d1bde5b1aace11de50cb0
tree9eefe432f0fd6f7dc9e05d61bb15bff1a463b8b4
parentd5380ceede6fe2d2e305ee9664403089291eca9f
netfilter: ctnetlink: fix dump of the expect mask attribute

[ Upstream commit b58f33d49e426dc66e98ed73afb5d97b15a25f2d ]

Before this change, the mask is never included in the netlink message, so
"conntrack -E expect" always prints 0.0.0.0.

In older kernels the l3num callback struct was passed as argument, based
on tuple->src.l3num. After the l3num indirection got removed, the call
chain is based on m.src.l3num, but this value is 0xffff.

Init l3num to the correct value.

Fixes: f957be9d349a3 ("netfilter: conntrack: remove ctnetlink callbacks from l3 protocol trackers")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_conntrack_netlink.c