Skip to content

Commit

Permalink
netfilter: ctnetlink: include conntrack status in destroy event message
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Hugelshofer authored and David S. Miller committed Jun 9, 2008
1 parent 718d4ad commit e57dce6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e57dce6

Please sign in to comment.