All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gre: fix ToS/DiffServ inherit bug
@ 2009-07-14 15:36 Andreas Jaggi
  2009-07-14 16:34 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Jaggi @ 2009-07-14 15:36 UTC (permalink / raw)
  To: Wojtek Sawasciuk; +Cc: netdev, kuznet, kaber, davem

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;
 	}
 
 	{

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-14 17:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-14 15:36 [PATCH] gre: fix ToS/DiffServ inherit bug Andreas Jaggi
2009-07-14 16:34 ` David Miller
2009-07-14 16:43   ` David Miller
2009-07-14 17:28   ` Alexey Kuznetsov

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.