All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Transmit mark to userspace during conntrack event
@ 2006-04-16 21:45 Eric Leblond
  2006-04-21 20:55 ` [PATCH] Rsend : " Eric Leblond
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Leblond @ 2006-04-16 21:45 UTC (permalink / raw)
  To: netfilter-devel


[-- Attachment #1.1: Type: text/plain, Size: 220 bytes --]

Hi,

When userspace listen to conntrack event, the connection mark was not
sent in the ctnetlink message. The following patch transmits the
connection mark to userspace.

BR,
-- 
Eric Leblond <eric@inl.fr>
INL

[-- Attachment #1.2: conntrack_event_with_mark.patch --]
[-- Type: text/x-patch, Size: 1068 bytes --]

diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index 01bd7ca..0982a9d 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -385,6 +385,9 @@ static int ctnetlink_conntrack_event(str
 	    ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)
 		goto nfattr_failure;
 
+	if (ctnetlink_dump_mark(skb,ct) < 0)
+		goto nfattr_failure;
+
 	nlh->nlmsg_len = skb->tail - b;
 	nfnetlink_send(skb, 0, group, 0);
 	return NOTIFY_DONE;
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index bd10eb9..458a0d5 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -394,6 +394,9 @@ static int ctnetlink_conntrack_event(str
 	    ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)
 		goto nfattr_failure;
 
+	if (ctnetlink_dump_mark(skb,ct) < 0)
+		goto nfattr_failure;
+
 	nlh->nlmsg_len = skb->tail - b;
 	nfnetlink_send(skb, 0, group, 0);
 	return NOTIFY_DONE;

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

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

end of thread, other threads:[~2006-04-21 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-16 21:45 [PATCH] Transmit mark to userspace during conntrack event Eric Leblond
2006-04-21 20:55 ` [PATCH] Rsend : " Eric Leblond
2006-04-21 23:54   ` 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.