* [PATCH 3/7] Add conntrack marking support from userspace
@ 2005-11-04 18:00 Pablo Neira
2005-11-05 7:35 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira @ 2005-11-04 18:00 UTC (permalink / raw)
To: Netfilter Development Mailinglist; +Cc: Harald Welte
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
This patch adds support for conntrack marking from user space.
--
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
[-- Attachment #2: 06-set-mark.patch --]
[-- Type: text/plain, Size: 1030 bytes --]
This patch adds support for conntrack marking from user space.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Index: net-2.6.git/net/ipv4/netfilter/ip_conntrack_netlink.c
===================================================================
--- net-2.6.git.orig/net/ipv4/netfilter/ip_conntrack_netlink.c 2005-11-04 17:45:21.000000000 +0100
+++ net-2.6.git/net/ipv4/netfilter/ip_conntrack_netlink.c 2005-11-04 18:31:06.000000000 +0100
@@ -979,6 +979,11 @@ ctnetlink_change_conntrack(struct ip_con
return err;
}
+#if defined(CONFIG_IP_NF_CONNTRACK_MARK)
+ if (cda[CTA_MARK-1])
+ ct->mark = ntohl(*(u_int32_t *)NFA_DATA(cda[CTA_MARK-1]));
+#endif
+
DEBUGP("all done\n");
return 0;
}
@@ -1022,6 +1027,11 @@ ctnetlink_create_conntrack(struct nfattr
if (ct->helper)
ip_conntrack_helper_put(ct->helper);
+#if defined(CONFIG_IP_NF_CONNTRACK_MARK)
+ if (cda[CTA_MARK-1])
+ ct->mark = ntohl(*(u_int32_t *)NFA_DATA(cda[CTA_MARK-1]));
+#endif
+
DEBUGP("conntrack with id %u inserted\n", ct->id);
return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 3/7] Add conntrack marking support from userspace
2005-11-04 18:00 [PATCH 3/7] Add conntrack marking support from userspace Pablo Neira
@ 2005-11-05 7:35 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2005-11-05 7:35 UTC (permalink / raw)
To: Pablo Neira; +Cc: Harald Welte, Netfilter Development Mailinglist
Pablo Neira wrote:
> This patch adds support for conntrack marking from user space.
This seems to be missing sizechecks. Looking at ip_conntrack_netlink,
they seem to be missing a few other places too.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-05 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-04 18:00 [PATCH 3/7] Add conntrack marking support from userspace Pablo Neira
2005-11-05 7:35 ` 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.