From: Patrick McHardy <kaber@trash.net>
To: Grzegorz Nosek <blackfire@metal.art.pl>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: MARK target extension
Date: Thu, 27 May 2004 11:53:08 +0200 [thread overview]
Message-ID: <40B5BA84.5040601@trash.net> (raw)
In-Reply-To: <20040526205915.M56972@metal.art.pl>
Grzegorz Nosek wrote:
> Hello all!
>
> I've extended the MARK target (ipv4 only currently) to allow partial
> modification of nfmark values instead of replacing. As in:
>
> ... -j MARK --set-mark 0x80
> ... -j MARK --set-mark 0x8000 --mask 0xff00
>
> sets the resulting mark value to 0x8080. Note that it isn't a logical OR:
>
> ... -j MARK --set-mark 0xffff
> ... -j MARK --set-mark 0 --mask 0xff
>
> would change the mark to 0xff00.
>
> This way you can use the nfmark as a bit field (testing individual
> bits can be done already). Patches included are based on
> iptables-1.2.9 (from debian sarge source) and kernel 2.4.26, somewhat
> patched (nothing related to nfmark, though, so it should apply cleanly
> to a vanilla kernel too). What do you think? IMNSHO it would be useful
> to include in standard kernel/iptables especially as it breaks no
> existing applications (default mask is 0xffffffff), is no code bloat
> and might actually be useful to somebody besides me. Note that it's my
> first public kernel patch so be gentle.
We already have a similar patch, MARK-operations, in pom-ng.
Unfortunately it can't be included in the stable series because
it breaks userspace compatibility.
Regards
Patrick
>
> Regards,
> Greg
next prev parent reply other threads:[~2004-05-27 9:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-26 22:09 MARK target extension Grzegorz Nosek
2004-05-27 9:53 ` Patrick McHardy [this message]
2004-06-05 22:06 ` Grzegorz Nosek
2004-06-06 14:25 ` Patrick McHardy
[not found] ` <20040608073821.M38174@metal.art.pl>
2004-06-09 8:51 ` Patrick McHardy
2004-06-09 13:43 ` Henrik Nordstrom
2004-06-13 20:23 ` Patrick McHardy
2004-06-14 17:26 ` Grzegorz Nosek
2004-06-14 20:59 ` Henrik Nordstrom
[not found] <20040609222646.M64@metal.art.pl>
2004-06-10 9:59 ` Henrik Nordstrom
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=40B5BA84.5040601@trash.net \
--to=kaber@trash.net \
--cc=blackfire@metal.art.pl \
--cc=netfilter-devel@lists.netfilter.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 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.