Commit ee686ca9 authored by Andreas Jaggi's avatar Andreas Jaggi Committed by David S. Miller

gre: fix ToS/DiffServ inherit bug

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: default avatarAndreas Jaggi <aj@open.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8159b2d
...@@ -735,10 +735,10 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -735,10 +735,10 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
} }
tos = tiph->tos; tos = tiph->tos;
if (tos&1) { if (tos == 1) {
tos = 0;
if (skb->protocol == htons(ETH_P_IP)) if (skb->protocol == htons(ETH_P_IP))
tos = old_iph->tos; tos = old_iph->tos;
tos &= ~1;
} }
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment