summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLiam McBirnie <mcbirnie.l@gmail.com>2017-06-01 07:36:01 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-05 01:49:33 +0200
commit5f733ee68f9a4df94775299ac6a7ab260704f6ed (patch)
treeca9c62d86761815526c9694064c0224349e6fd32 /net
parentnet: qcom/emac: do not use hardware mdio automatic polling (diff)
downloadlinux-5f733ee68f9a4df94775299ac6a7ab260704f6ed.tar.xz
linux-5f733ee68f9a4df94775299ac6a7ab260704f6ed.zip
ip6_tunnel: fix traffic class routing for tunnels
ip6_route_output() requires that the flowlabel contains the traffic class for policy routing. Commit 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets") removed the code which previously added the traffic class to the flowlabel. The traffic class is added here because only route lookup needs the flowlabel to contain the traffic class. Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets") Signed-off-by: Liam McBirnie <liam.mcbirnie@boeing.com> Acked-by: Peter Dawson <peter.a.dawson@boeing.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ip6_tunnel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 7ae6c503f1ca..9b37f9747fc6 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1095,6 +1095,9 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
if (!dst) {
route_lookup:
+ /* add dsfield to flowlabel for route lookup */
+ fl6->flowlabel = ip6_make_flowinfo(dsfield, fl6->flowlabel);
+
dst = ip6_route_output(net, NULL, fl6);
if (dst->error)