Skip to content

Commit 5f733ee

Browse files
liam-mcbdavem330
authored andcommitted
ip6_tunnel: fix traffic class routing for tunnels
ip6_route_output() requires that the flowlabel contains the traffic class for policy routing. Commit 0e9a709 ("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: 0e9a709 ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets") Signed-off-by: Liam McBirnie <[email protected]> Acked-by: Peter Dawson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2460966 commit 5f733ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ipv6/ip6_tunnel.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,9 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
10951095

10961096
if (!dst) {
10971097
route_lookup:
1098+
/* add dsfield to flowlabel for route lookup */
1099+
fl6->flowlabel = ip6_make_flowinfo(dsfield, fl6->flowlabel);
1100+
10981101
dst = ip6_route_output(net, NULL, fl6);
10991102

11001103
if (dst->error)

0 commit comments

Comments
 (0)