From: Eric Leblond <eric@inl.fr>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] Transmit mark to userspace during conntrack event
Date: Sun, 16 Apr 2006 23:45:45 +0200 [thread overview]
Message-ID: <1145223945.5659.4.camel@porky> (raw)
[-- 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 --]
next reply other threads:[~2006-04-16 21:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-16 21:45 Eric Leblond [this message]
2006-04-21 20:55 ` [PATCH] Rsend : Transmit mark to userspace during conntrack event Eric Leblond
2006-04-21 23:54 ` 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=1145223945.5659.4.camel@porky \
--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.