netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] Change xt_TOS v1 target to zero-out semantic
Date: Mon, 17 Dec 2007 14:04:24 +0100	[thread overview]
Message-ID: <476673D8.50701@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0712151447250.22877@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
> This patch changes the behavior of xt_TOS v1 so that the mask value
> one supplies means "zero out these bits" rather than "keep these
> bits". This is more easy on the user, as (I would assume) people
> keep more bits than zeroing, so, an example:
> 
> 	Action: Set bit 0x01.
> 	before: iptables -j TOS --set-tos 0x01/0xFE
> 	after:  iptables -j TOS --set-tos 0x01/0x01
> 
> This is not too "tragic" with xt_TOS, but where larger fields are
> used (e.g. proposed xt_MARK v2), `--set-xmark 0x01/0xFFFFFFFE` vs.
> `--set-xmark 0x01/0x01` is really a worthy difference.
> Other modules, such as xt_TPROXY also use &~ rather than &, so
> let's find a common ground.

I'm going to apply this, but only if we're going to have
an easier to use userspace extension for this.

I'd prefer:

--set-tos: set exact value, no mask
--or-tos: set single bits
--xor-tos: flip single bits
--and-tos: mask single bits

  reply	other threads:[~2007-12-17 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-15 13:48 [PATCH] Change xt_TOS v1 target to zero-out semantic Jan Engelhardt
2007-12-17 13:04 ` Patrick McHardy [this message]
2007-12-17 13:09   ` Jan Engelhardt
2007-12-17 13:13     ` 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=476673D8.50701@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@computergmbh.de \
    --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).