From: Jesse Gross Date: Thu, 4 Mar 2010 22:02:37 +0000 (-0500) Subject: gre: Allow IPv6 ToS bits to be propagated to tunnel packets. X-Git-Tag: v1.0.0~259^2~40 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=322efeb7d3cbc49fe3bc2db53f61529c617fa4f5;p=sliver-openvswitch.git gre: Allow IPv6 ToS bits to be propagated to tunnel packets. The IPv6 ToS bits should have the same meaning as in IPv4, so allow them to be copied from the inner packet to the tunnel packet if enabled. --- diff --git a/datapath/linux-2.6/compat-2.6/ip_gre.c b/datapath/linux-2.6/compat-2.6/ip_gre.c index 2f46e05ae..5882b3cbd 100644 --- a/datapath/linux-2.6/compat-2.6/ip_gre.c +++ b/datapath/linux-2.6/compat-2.6/ip_gre.c @@ -813,6 +813,8 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev tos = 0; if (skb->protocol == htons(ETH_P_IP)) tos = old_iph->tos; + else if (skb->protocol == htons(ETH_P_IPV6)) + tos = ipv6_get_dsfield(ipv6_hdr(skb)); } {