From: Patrick McHardy <kaber@trash.net>
To: "Nikolay S. Rybalov" <nowhere@hakkenden.ath.cx>
Cc: netfilter@vger.kernel.org,
Netfilter Development Mailinglist
<netfilter-devel@vger.kernel.org>,
Jan Engelhardt <jengelh@medozas.de>
Subject: Re: Troubles with MARK target in 2.6.28
Date: Mon, 12 Jan 2009 07:19:15 +0100 [thread overview]
Message-ID: <496AE0E3.1030009@trash.net> (raw)
In-Reply-To: <86617ABF8F494F2A940C18251E3DC8D0@Hakkenden>
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
Nikolay S. Rybalov wrote:
> Hi all,
>
> I have troubles with "-j MARK --set-xmark" combination in mangle table.
> Particulary, I want set one bit in nf mark by means, say, --set-xmark
> 0x10/0x10, and it worked in kernels from at least 2.6.24 up to the last
> in 2.6.27.
>
> I use: iptables -t mangle -A POSTROUTING -o eth1 -d 192.168.37.0/24 -j
> MARK --set-xmark 0x10/0x10
>
> and get:
>
> iptables v1.4.2: Unknown arg `(null)'
> Try `iptables -h' or 'iptables --help' for more information.
>
> When I try --or-mark, iptables says that my "kernel too old for --or-mark"
>
> Same thing happens with -j CONNMARK.
>
> Can someone advise what to do, I really need to set only one bit without
> altering the rest of the mark.
Does this patch fix it?
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 412 bytes --]
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 89837a4..36cb63b 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -289,6 +289,10 @@ static int target_revfn(u8 af, const char *name, u8 revision, int *bestp)
have_rev = 1;
}
}
+
+ if (af != NFPROTO_UNSPEC && !have_rev)
+ return target_revfn(NFPROTO_UNSPEC, name, revision, bestp);
+
return have_rev;
}
next parent reply other threads:[~2009-01-12 6:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <86617ABF8F494F2A940C18251E3DC8D0@Hakkenden>
2009-01-12 6:19 ` Patrick McHardy [this message]
2009-01-12 7:08 ` Troubles with MARK target in 2.6.28 Patrick McHardy
2009-01-12 7:15 ` Jan Engelhardt
2009-01-12 7:18 ` Patrick McHardy
2009-01-14 5:39 ` Jan Engelhardt
2009-01-15 8:06 ` Targets with "mangle" table limiting (Was: Re: Troubles with MARK target in 2.6.28) Jan Engelhardt
2009-01-15 12:08 ` James King
2009-01-15 13:47 ` Patrick McHardy
2009-01-15 16:44 ` Jan Engelhardt
2009-01-15 22:38 ` James King
2009-01-16 8:04 ` Patrick McHardy
2009-01-18 7:32 ` James King
2009-01-16 7:33 ` Patrick McHardy
2009-01-16 8:15 ` Jan Engelhardt
2009-01-16 8:19 ` Patrick McHardy
2009-01-18 7:08 ` James King
2009-01-19 14:29 ` Patrick McHardy
2009-01-15 13:57 ` Troubles with MARK target in 2.6.28 Patrick McHardy
2009-01-15 14:06 ` Pablo Neira Ayuso
2009-01-15 15:51 ` Jan Engelhardt
2009-01-15 15:54 ` Patrick McHardy
2009-01-15 15:58 ` Jan Engelhardt
2009-01-15 16:03 ` Patrick McHardy
2009-01-15 16:20 ` Jan Engelhardt
2009-01-16 7:33 ` Patrick McHardy
2009-01-16 8:14 ` Jan Engelhardt
2009-01-12 18:12 ` Nikolay S. Rybaloff
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=496AE0E3.1030009@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
--cc=nowhere@hakkenden.ath.cx \
/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).