Newer
Older
patches / linux-2.6.29.4-gre-fix-tos-inheritance.patch
@Andreas Jaggi Andreas Jaggi on 25 Oct 2015 533 bytes Linux 2.6.29.4 fix GRE ToS inheritance patch
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;
 	}
 
 	{