netfilter: ctnetlink: dump conntrack ID in event messages

Conntrack ID is not put (anymore ?) in event messages. This causes
current ulogd2 code to fail because it uses the ID to build a hash in
userspace. This hash is used to be able to output the starting time of
a connection.

Conntrack ID can be used in userspace application to maintain an easy
match between kernel connections list and userspace one. It may worth
to add it if there is no performance related issue.

[ Patrick: it was never included in events, but really should be ]

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Eric Leblond and committed by David S. Miller 1eedf699 33222383

+3
+3
net/netfilter/nf_conntrack_netlink.c
··· 472 goto nla_put_failure; 473 nla_nest_end(skb, nest_parms); 474 475 if (events & IPCT_DESTROY) { 476 if (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 || 477 ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)
··· 472 goto nla_put_failure; 473 nla_nest_end(skb, nest_parms); 474 475 + if (ctnetlink_dump_id(skb, ct) < 0) 476 + goto nla_put_failure; 477 + 478 if (events & IPCT_DESTROY) { 479 if (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 || 480 ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)