netfilter: ctnetlink: fix expectation mask dump
Subsystems (2)
I'm about to commit the following two bugfixes to nf-2.6.git.
I'll wait for a few hours in case someone wants to comment or add an Ack.
commit 0f682015a83fad33869f49b941adf682b4b4394c
Author: Patrick McHardy <[email protected]> Date: Thu Jan 21 11:08:52 2010 +0100
netfilter: ctnetlink: fix expectation mask dump
The protocol number is not initialized, so userspace can't interpret the layer 4 data properly.
Signed-off-by Patrick McHardy <[email protected]>
net/netfilter/nf_conntrack_netlink.c +2 -1
@@ -1446,8 +1446,9 @@ ctnetlink_exp_dump_mask(struct sk_buff *skb,struct nlattr *nest_parms;memset (&m,0xFF ,sizeof (m)); - m.src.u.all = mask->src.u.all;memcpy (&m.src.u3, &mask->src.u3,sizeof (m.src.u3)); + m.src.u.all = mask->src.u.all; + m.dst.protonum = tuple->dst.protonum; nest_parms =nla_nest_start (skb,CTA_EXPECT_MASK |NLA_F_NESTED );if (!nest_parms)