All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Leblond <eric@inl.fr>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] Rsend : Transmit mark to userspace during conntrack event
Date: Fri, 21 Apr 2006 22:55:32 +0200	[thread overview]
Message-ID: <1145652932.5191.6.camel@localhost.localdomain> (raw)
In-Reply-To: <1145223945.5659.4.camel@porky>


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

Le dimanche 16 avril 2006 à 23:45 +0200, Eric Leblond a écrit :
> 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,

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

Signed-off-by: Eric Leblond <eric@inl.fr>

---
Transmit connection mark to userspace

Connection mark was not sent to userspace when used in event linstening mode.

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: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

  reply	other threads:[~2006-04-21 20:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-16 21:45 [PATCH] Transmit mark to userspace during conntrack event Eric Leblond
2006-04-21 20:55 ` Eric Leblond [this message]
2006-04-21 23:54   ` [PATCH] Rsend : " Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1145652932.5191.6.camel@localhost.localdomain \
    --to=eric@inl.fr \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.