netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Warasin <peter@endian.com>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH] Fix CONNMARK mask value demolition
Date: Sun, 06 Jan 2008 04:04:46 +0100	[thread overview]
Message-ID: <4780454E.3050803@endian.com> (raw)

[-- 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);

             reply	other threads:[~2008-01-06  3:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06  3:04 Peter Warasin [this message]
2008-01-09 13:37 ` [PATCH] Fix CONNMARK mask value demolition 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

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=4780454E.3050803@endian.com \
    --to=peter@endian.com \
    --cc=netfilter-devel@vger.kernel.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 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).