From: Fabian Hugelshofer Date: Mon, 9 Jun 2008 22:59:58 +0000 (-0700) Subject: netfilter: ctnetlink: include conntrack status in destroy event message X-Git-Tag: v2.6.27-rc1~964^2~341 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e57dce60c7478fdeeb9a1ebd311261ec901afe4d;p=profile%2Fivi%2Fkernel-x86-ivi.git netfilter: ctnetlink: include conntrack status in destroy event message When a conntrack is destroyed, the connection status does not get exported to netlink. I don't see a reason for not doing so. This patch exports the status on all conntrack events. Signed-off-by: Fabian Hugelshofer Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index ab655f6..63c4e1f 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -475,14 +475,14 @@ static int ctnetlink_conntrack_event(struct notifier_block *this, if (ctnetlink_dump_id(skb, ct) < 0) goto nla_put_failure; + if (ctnetlink_dump_status(skb, ct) < 0) + goto nla_put_failure; + if (events & IPCT_DESTROY) { if (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 || ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0) goto nla_put_failure; } else { - if (ctnetlink_dump_status(skb, ct) < 0) - goto nla_put_failure; - if (ctnetlink_dump_timeout(skb, ct) < 0) goto nla_put_failure;