All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: aj@open.ch
Cc: voyo@no-ip.pl, netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru,
	kaber@trash.net
Subject: Re: [PATCH] gre: fix ToS/DiffServ inherit bug
Date: Tue, 14 Jul 2009 09:34:33 -0700 (PDT)	[thread overview]
Message-ID: <20090714.093433.216171575.davem@davemloft.net> (raw)
In-Reply-To: <20090714153648.GC8461@urbino.open.ch>

From: Andreas Jaggi <aj@open.ch>
Date: Tue, 14 Jul 2009 17:36:48 +0200

> Fixes two bugs:
> - ToS/DiffServ inheritance was unintentionally activated when using impair fixed ToS values
> - ECN bit was lost during ToS/DiffServ inheritance
> 
> Signed-off-by: Andreas Jaggi <aj@open.ch>
 ...
>  	tos = tiph->tos;
> -	if (tos&1) {
> +	if (tos == 1) {
> +		tos = 0;
>  		if (skb->protocol == htons(ETH_P_IP))
>  			tos = old_iph->tos;
> -		tos &= ~1;
>  	}

Note that this only works out because one wouldn't specify ECN
bits in the TOS to use for the tunnel.

But it demonstrates the outright danger of trying to use
"undefined" flag bits in protocol header fields to pass
private control flags into the driver from user interfaces.

  reply	other threads:[~2009-07-14 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 15:36 [PATCH] gre: fix ToS/DiffServ inherit bug Andreas Jaggi
2009-07-14 16:34 ` David Miller [this message]
2009-07-14 16:43   ` David Miller
2009-07-14 17:28   ` Alexey Kuznetsov

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=20090714.093433.216171575.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=aj@open.ch \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=voyo@no-ip.pl \
    /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.