netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix CONNMARK mask value demolition
@ 2008-01-06  3:04 Peter Warasin
  2008-01-09 13:37 ` Peter Warasin
  2008-01-15  7:04 ` Patrick McHardy
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Warasin @ 2008-01-06  3:04 UTC (permalink / raw)
  To: netfilter-devel

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

This patch fixes the problem that the CONNMARK mask value
has been set to 0 whenever the CONNMARK target options has not
been the last options to be processed.

Signed-off-by: Peter Warasin <peter@endian.com>

---


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

Index: iptables/extensions/libxt_CONNMARK.c
===================================================================
--- iptables.orig/extensions/libxt_CONNMARK.c	2008-01-06 03:08:18.000000000 +0100
+++ iptables/extensions/libxt_CONNMARK.c	2008-01-06 03:09:54.000000000 +0100
@@ -64,13 +64,12 @@
 	struct xt_connmark_target_info *markinfo
 		= (struct xt_connmark_target_info *)(*target)->data;
 
-	markinfo->mask = 0xffffffffUL;
-
 	switch (c) {
 		char *end;
 	case '1':
 		markinfo->mode = XT_CONNMARK_SET;
 
+		markinfo->mask = 0xffffffffUL;
 		markinfo->mark = strtoul(optarg, &end, 0);
 		if (*end == '/' && end[1] != '\0')
 		    markinfo->mask = strtoul(end+1, &end, 0);

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

end of thread, other threads:[~2008-01-15 15:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06  3:04 [PATCH] Fix CONNMARK mask value demolition Peter Warasin
2008-01-09 13:37 ` Peter Warasin
2008-01-15  7:04 ` Patrick McHardy
2008-01-15 11:45   ` [PATCH v2] " Peter Warasin
2008-01-15 15:46     ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).