All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC, PATCH] Dump conntrack ID in event messages.
@ 2008-05-09 19:24 Eric Leblond
  2008-05-10 13:24 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Leblond @ 2008-05-09 19:24 UTC (permalink / raw)
  To: pablo, netfilter-devel; +Cc: Eric Leblond

Hello,

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.

BR,

Signed-off-by: Eric Leblond <eric@inl.fr>
---
 net/netfilter/nf_conntrack_netlink.c |    3 +++
 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)
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-10 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-09 19:24 [RFC, PATCH] Dump conntrack ID in event messages Eric Leblond
2008-05-10 13:24 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.