Commit 3ab7563e authored by Liam McBirnie's avatar Liam McBirnie Committed by Greg Kroah-Hartman

ip6_tunnel: fix traffic class routing for tunnels


[ Upstream commit 5f733ee6 ]

ip6_route_output() requires that the flowlabel contains the traffic
class for policy routing.

Commit 0e9a7095 ("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: 0e9a7095 ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets")
Signed-off-by: default avatarLiam McBirnie <liam.mcbirnie@boeing.com>
Acked-by: default avatarPeter Dawson <peter.a.dawson@boeing.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 35e08f6e
...@@ -1095,6 +1095,9 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield, ...@@ -1095,6 +1095,9 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
if (!dst) { if (!dst) {
route_lookup: route_lookup:
/* add dsfield to flowlabel for route lookup */
fl6->flowlabel = ip6_make_flowinfo(dsfield, fl6->flowlabel);
dst = ip6_route_output(net, NULL, fl6); dst = ip6_route_output(net, NULL, fl6);
if (dst->error) if (dst->error)
......
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