netfilter: ctnetlink: fix dump of the expect mask attribute
Subsystems (2)
Florian Westphal
maintainerPATCH 1/1 netfilter: ctnetlink: fix dump of the expect mask attribute
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.
--- net/netfilter/nf_conntrack_netlink.c | 1 + 1 file changed, 1 insertion(+)
net/netfilter/nf_conntrack_netlink.c +1 -0
@@ -2962,6 +2962,7 @@ static int ctnetlink_exp_dump_mask(struct sk_buff *skb,memset (&m,0xFF ,sizeof (m));memcpy (&m.src.u3, &mask->src.u3,sizeof (m.src.u3)); m.src.u.all = mask->src.u.all; + m.src.l3num = tuple->src.l3num; m.dst.protonum = tuple->dst.protonum; nest_parms =nla_nest_start (skb,CTA_EXPECT_MASK );
Signature · 1 line
2.29.2
Quoted 8 lines · Florian Westphal
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 is0xffff.Init l3num to the correct value.
Applied, thanks.