summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2008-05-13 23:27:11 -0700
committerDavid S. Miller <davem@davemloft.net>2008-05-13 23:27:11 -0700
commit1eedf69993d4016428fd99ffd619e73b374be3c1 (patch)
tree5eb8c64c352cbf4e231c12f1617f95217b926a49 /net
parent332223831e86b2e17b48b4afafad07d8e3b73861 (diff)
downloadop-kernel-dev-1eedf69993d4016428fd99ffd619e73b374be3c1.zip
op-kernel-dev-1eedf69993d4016428fd99ffd619e73b374be3c1.tar.gz
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>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_netlink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 16774ec..0edefcf 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -472,6 +472,9 @@ static int ctnetlink_conntrack_event(struct notifier_block *this,
goto nla_put_failure;
nla_nest_end(skb, nest_parms);
+ if (ctnetlink_dump_id(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)
OpenPOWER on IntegriCloud