Skip to content

Commit

Permalink
gre: fix ToS/DiffServ inherit bug
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andreas Jaggi authored and David S. Miller committed Jul 14, 2009
1 parent c8159b2 commit ee686ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,10 +735,10 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
}

tos = tiph->tos;
if (tos&1) {
if (tos == 1) {
tos = 0;
if (skb->protocol == htons(ETH_P_IP))
tos = old_iph->tos;
tos &= ~1;
}

{
Expand Down

0 comments on commit ee686ca

Please sign in to comment.