From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Julian Anastasov <ja@ssi.bg>
Cc: netdev@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH net] fib_rules: don't break ECN with TOS rules
Date: Sun, 12 Jun 2016 02:38:20 +0200 [thread overview]
Message-ID: <1465691900.3002733.634955425.22770D5E@webmail.messagingengine.com> (raw)
In-Reply-To: <1465691799.3002631.634954313.3E40DB3C@webmail.messagingengine.com>
On Sun, Jun 12, 2016, at 02:36, Hannes Frederic Sowa wrote:
> On Sun, Jun 12, 2016, at 02:09, Julian Anastasov wrote:
> >
> > Hello,
> >
> > On Sat, 11 Jun 2016, Hannes Frederic Sowa wrote:
> >
> > > Users of ToS rules could accidentally break ECN, this patch tries to
> > > fix this in a way so we don't break shell scripts depending on the old
> > > behavior while still being transparent to ECN. This quietly fixes ECN
> > > behavior for old setups.
> > >
> > > For IPv6 we have no check if we check for ECN bits, in IPv4 we only
> > > check for the last bit, which is specified to be '0' from pre-DSCP times
> > > (because of implementation confusion).
> > >
> > > This patch changes fib rules in a way that matches only for ecn bits
> > > will never match from now on (I consider them illegal), as we simply
> > > ignore those rules (it was easier to explain in a pr_warn). Opinions?
> >
> > Well, may be the confusion comes from commit 89aef8921bfb
> > ("ipv4: Delete routing cache.") where the 'tos &= IPTOS_RT_MASK;'
> > line is lost from ip_route_input_common. I think, we should
> > add it back, so that we can properly match input routes with rules
> > that specify tos value. Old kernels didn't stored ECN bits in
> > flowi4_tos in the input path, so we should do the same.
>
> I would love to have done that but was fearing problems with user space
> compatibility. Also IPTOS_RT_MASK is not enough for filtering, we need
> to check for the whole INET_ECN_MASK.
Correction: IPTOS_RT_MASK would be fine, but fib4_rule_configure uses
IPTOS_TOS_MASK.
Bye,
Hannes
next prev parent reply other threads:[~2016-06-12 0:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-11 21:10 [PATCH net] fib_rules: don't break ECN with TOS rules Hannes Frederic Sowa
2016-06-12 0:09 ` Julian Anastasov
2016-06-12 0:36 ` Hannes Frederic Sowa
2016-06-12 0:38 ` Hannes Frederic Sowa [this message]
2016-06-12 9:28 ` Julian Anastasov
2016-06-12 10:28 ` Hannes Frederic Sowa
2016-06-12 22:18 ` David Ahern
2016-06-13 21:49 ` Hannes Frederic Sowa
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=1465691900.3002733.634955425.22770D5E@webmail.messagingengine.com \
--to=hannes@stressinduktion.org \
--cc=fw@strlen.de \
--cc=ja@ssi.bg \
--cc=netdev@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).