Netdev List
 help / color / mirror / Atom feed
From: Andreas Jaggi <aj@open.ch>
To: Wojtek Sawasciuk <voyo@no-ip.pl>
Cc: netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru, kaber@trash.net,
	davem@davemloft.net
Subject: [PATCH] gre: fix ToS/DiffServ inherit bug
Date: Tue, 14 Jul 2009 17:36:48 +0200	[thread overview]
Message-ID: <20090714153648.GC8461@urbino.open.ch> (raw)

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>

--- vanilla-linux-2.6.29.4/net/ipv4/ip_gre.c	2009-05-19 01:52:34.000000000 +0200
+++ gre-dev-2/net/ipv4/ip_gre.c	2009-07-14 17:14:34.000000000 +0200
@@ -677,10 +677,10 @@
 	}
 
 	tos = tiph->tos;
-	if (tos&1) {
+	if (tos == 1) {
+		tos = 0;
 		if (skb->protocol == htons(ETH_P_IP))
 			tos = old_iph->tos;
-		tos &= ~1;
 	}
 
 	{

             reply	other threads:[~2009-07-14 15:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 15:36 Andreas Jaggi [this message]
2009-07-14 16:34 ` [PATCH] gre: fix ToS/DiffServ inherit bug David Miller
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=20090714153648.GC8461@urbino.open.ch \
    --to=aj@open.ch \
    --cc=davem@davemloft.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox