gre: Allow IPv6 ToS bits to be propagated to tunnel packets.
[openvswitch] / datapath / linux-2.6 / compat-2.6 / ip_gre.c
index 2f46e05aef2dfdbcfc55092db908978142e41fd1..5882b3cbd2ce032d4af893138d3d6f241b37414e 100644 (file)
@@ -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));
        }
 
        {