Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <hugelshofer2006@gmx.ch>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Fabian Hugelshofer and committed by
David S. Miller
e57dce60 718d4ad9

+3 -3
+3 -3
net/netfilter/nf_conntrack_netlink.c
··· 475 475 if (ctnetlink_dump_id(skb, ct) < 0) 476 476 goto nla_put_failure; 477 477 478 + if (ctnetlink_dump_status(skb, ct) < 0) 479 + goto nla_put_failure; 480 + 478 481 if (events & IPCT_DESTROY) { 479 482 if (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 || 480 483 ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0) 481 484 goto nla_put_failure; 482 485 } else { 483 - if (ctnetlink_dump_status(skb, ct) < 0) 484 - goto nla_put_failure; 485 - 486 486 if (ctnetlink_dump_timeout(skb, ct) < 0) 487 487 goto nla_put_failure; 488 488