Skip to contentSkip to conversation

dump conntrack mark

PATCH Applied Pablo Neira Ayuso 2 participants 2 messages Jul 25, 2006 – Aug 8, 2006

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 2/8 dump conntrack mark

ctnetlink dumps the mark iif the event mark happened

Signature · 1 line
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

[CTNETLINK] Dump conntrack mark

ctnetlink dumps the mark iif the event mark happened

net/ipv4/netfilter/ip_conntrack_netlink.c +4 -0
Index: net-2.6/net/ipv4/netfilter/ip_conntrack_netlink.c
===================================================================
@@ -385,6 +385,10 @@ static int ctnetlink_conntrack_event(str
 	    ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)
 		goto nfattr_failure;
 
+	if (events & IPCT_MARK
+	    && ctnetlink_dump_mark(skb, ct) < 0)
+		goto nfattr_failure;
+
 	nlh->nlmsg_len = skb->tail - b;
 	nfnetlink_send(skb, 0, group, 0);
 	return NOTIFY_DONE;
net/netfilter/nf_conntrack_netlink.c +4 -0
Index: net-2.6/net/netfilter/nf_conntrack_netlink.c
===================================================================
@@ -395,6 +395,10 @@ static int ctnetlink_conntrack_event(str
 	    ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)
 		goto nfattr_failure;
 
+	if (events & IPCT_MARK
+	    && ctnetlink_dump_mark(skb, ct) < 0)
+		goto nfattr_failure;
+
 	nlh->nlmsg_len = skb->tail - b;
 	nfnetlink_send(skb, 0, group, 0);
 	return NOTIFY_DONE;
#1 lore raw
Quoted 1 line · Pablo Neira Ayuso

ctnetlink dumps the mark iif the event mark happened

Also applied. And thanks for your patience btw :)