From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft 1/2] src: add dscp support
Date: Thu, 26 Nov 2015 10:42:49 +0000 [thread overview]
Message-ID: <20151126104249.GA16828@macbook.localdomain> (raw)
In-Reply-To: <20151126102833.GA2237@salvia>
On 26.11, Pablo Neira Ayuso wrote:
> On Thu, Nov 26, 2015 at 09:54:45AM +0000, Patrick McHardy wrote:
> > On 26.11, Pablo Neira Ayuso wrote:
> > > > > ToS breaks useful things like ECN, and the more I keep reading docs on
> > > > > the Internet, the more problem I have to see how the user can benefit
> > > > > from this.
> > > >
> > > > We *match* on ToS, that cannot possibly break anything. Also I'm unsure how
> > > > this could break ECN even otherwise, ToS does not even use the ECN bits.
> > >
> > > ToS bits overlap with ECN bits, from that original ToS 8 bit-field now
> > > we use 6 bit for DSCP and 2 bits for ECN.
> >
> > Sure, but our ToS definition is wrong anyway, the ToS-bits are actually
> > 3 + 3 + 2 unused bits (ECN).
>
> That's right according to the original ToS definition, but looking a
> bit further on the RFCs, someone outthere extended this, so I found
> this:
>
> See 22. Historical Definitions for the IPv4 TOS Octet from
> https://tools.ietf.org/html/rfc3168.
>
> It refers to https://tools.ietf.org/html/rfc1349 that defines
> Minimize Monetary Cost TOS Value and it extends it to one extra bit
> (from 3 to 4, scratching one from the unused bits).
>
> Bottom line says "Because of this unstable history, the definition of
> the ECN field in this document cannot be guaranteed to be backwards
> compatible with all past uses of these two bits."
>
> Anyway, looking at the Linux header definitions, we have the
>
> #define IPTOS_MINCOST 0x02
>
> The mincost thing is there.
>
> #define IPTOS_TOS_MASK 0x1E
> #define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK)
>
> So it seems our headers are considering ToS is 4 bits too.
Hmm Ok its really a mess. Let's get rid of it for now and we might reconsider
if a user turns up that can make a valid case.
next prev parent reply other threads:[~2015-11-26 10:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 19:39 [PATCH nft 1/2] src: add dscp support Pablo Neira Ayuso
2015-11-25 19:39 ` [PATCH nft 2/2] src: add ecn support Pablo Neira Ayuso
2015-11-25 20:02 ` Patrick McHardy
2015-11-25 20:01 ` [PATCH nft 1/2] src: add dscp support Patrick McHardy
2015-11-25 20:22 ` Pablo Neira Ayuso
2015-11-25 20:45 ` Patrick McHardy
2015-11-25 22:05 ` Pablo Neira Ayuso
2015-11-25 23:23 ` Patrick McHardy
2015-11-26 9:45 ` Pablo Neira Ayuso
2015-11-26 9:54 ` Patrick McHardy
2015-11-26 10:28 ` Pablo Neira Ayuso
2015-11-26 10:42 ` Patrick McHardy [this message]
2015-11-25 23:17 ` Jan Engelhardt
2015-11-25 23:27 ` 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=20151126104249.GA16828@macbook.localdomain \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@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.