Skip to content

Commit 46f8cd9

Browse files
Haishuang Yandavem330
authored andcommitted
ip6_tunnel: Correct tos value in collect_md mode
Same as ip_gre, geneve and vxlan, use key->tos as traffic class value. CC: Peter Dawson <[email protected]> Fixes: 0e9a709 ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets”) Signed-off-by: Haishuang Yan <[email protected]> Acked-by: Peter Dawson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 76371d2 commit 46f8cd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv6/ip6_tunnel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
12481248
fl6.flowi6_proto = IPPROTO_IPIP;
12491249
fl6.daddr = key->u.ipv6.dst;
12501250
fl6.flowlabel = key->label;
1251-
dsfield = ip6_tclass(key->label);
1251+
dsfield = key->tos;
12521252
} else {
12531253
if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
12541254
encap_limit = t->parms.encap_limit;
@@ -1319,7 +1319,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
13191319
fl6.flowi6_proto = IPPROTO_IPV6;
13201320
fl6.daddr = key->u.ipv6.dst;
13211321
fl6.flowlabel = key->label;
1322-
dsfield = ip6_tclass(key->label);
1322+
dsfield = key->tos;
13231323
} else {
13241324
offset = ip6_tnl_parse_tlv_enc_lim(skb, skb_network_header(skb));
13251325
/* ip6_tnl_parse_tlv_enc_lim() might have reallocated skb->head */

0 commit comments

Comments
 (0)