Skip to contentSkip to conversation

dump ID and mark in conntrack events

PATCH Applied Pablo Neira Ayuso 2 participants 2 messages Dec 5, 2005 – Dec 15, 2005

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 8/8 dump ID and mark in conntrack events

Signature · 3 lines
-- 
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

Dump the ID and the mark in events. This info is useful for the userspace clients.

net/ipv4/netfilter/ip_conntrack_netlink.c +3 -1
Index: netfilter-2.6.14.git/net/ipv4/netfilter/ip_conntrack_netlink.c
===================================================================
@@ -373,7 +373,9 @@ static int ctnetlink_conntrack_event(str
 		goto nfattr_failure;
 
 	if (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 ||
-	    ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)
+	    ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0 ||
+	    ctnetlink_dump_mark(skb, ct) < 0 ||
+	    ctnetlink_dump_id(skb, ct) < 0)
 		goto nfattr_failure;
 
 	nlh->nlmsg_len = skb->tail - b;
#1 lore raw
Quoted 4 lines · Pablo Neira Ayuso

------------------------------------------------------------------------

Dump the ID and the mark in events. This info is useful for the userspace clients.

I agree on dumping the mark, but do we really want to dump the ID? That prevents us from getting rid of it even if figgure out a nicer way to do the dumping.