All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] add support for modifying secmark via ctnetlink
@ 2008-05-20 22:29 Pablo Neira Ayuso
  2008-05-21 11:15 ` Patrick McHardy
  0 siblings, 1 reply; 14+ messages in thread
From: Pablo Neira Ayuso @ 2008-05-20 22:29 UTC (permalink / raw)
  To: Netfilter Development Mailinglist; +Cc: Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

As for now we only support dumping. This patch adds support to change
the secmark from ctnetlink.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers

[-- Attachment #2: 04.patch --]
[-- Type: text/x-patch, Size: 917 bytes --]

[PATCH] add support for modifying secmark via ctnetlink

As for now we only support dumping. This patch adds support to change
the secmark from ctnetlink.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Index: net-2.6.git/net/netfilter/nf_conntrack_netlink.c
===================================================================
--- net-2.6.git.orig/net/netfilter/nf_conntrack_netlink.c	2008-05-20 22:10:31.000000000 +0200
+++ net-2.6.git/net/netfilter/nf_conntrack_netlink.c	2008-05-20 22:10:56.000000000 +0200
@@ -1121,6 +1121,11 @@ ctnetlink_change_conntrack(struct nf_con
 		ct->mark = ntohl(nla_get_be32(cda[CTA_MARK]));
 #endif
 
+#if defined(CONFIG_NF_CONNTRACK_SECMARK)
+	if (cda[CTA_SECMARK])
+		ct->secmark = ntohl(nla_get_be32(cda[CTA_SECMARK]));
+#endif
+
 #ifdef CONFIG_NF_NAT_NEEDED
 	if (cda[CTA_NAT_SEQ_ADJ_ORIG] || cda[CTA_NAT_SEQ_ADJ_REPLY]) {
 		err = ctnetlink_change_nat_seq_adj(ct, cda);

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

end of thread, other threads:[~2008-05-22 19:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-20 22:29 [PATCH 3/4] add support for modifying secmark via ctnetlink Pablo Neira Ayuso
2008-05-21 11:15 ` Patrick McHardy
2008-05-21 11:42   ` James Morris
2008-05-21 12:00     ` Patrick McHardy
2008-05-21 16:46       ` Paul Moore
2008-05-21 16:54         ` Stephen Smalley
2008-05-21 17:13           ` Patrick McHardy
2008-05-22 18:11             ` Stephen Smalley
2008-05-22 19:08               ` Patrick McHardy
2008-05-21 17:41           ` Paul Moore
2008-05-21 17:11         ` Patrick McHardy
2008-05-21 17:51           ` Paul Moore
2008-05-21 17:55             ` Stephen Smalley
2008-05-21 19:03           ` Pablo Neira Ayuso

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.