Skip to content

Commit a0dced1

Browse files
liuhangbindavem330
authored andcommitted
Revert "vxlan: fix tos value before xmit"
This reverts commit 71130f2. In commit 71130f2 ("vxlan: fix tos value before xmit") we want to make sure the tos value are filtered by RT_TOS() based on RFC1349. 0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | PRECEDENCE | TOS | MBZ | +-----+-----+-----+-----+-----+-----+-----+-----+ But RFC1349 has been obsoleted by RFC2474. The new DSCP field defined like 0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | DS FIELD, DSCP | ECN FIELD | +-----+-----+-----+-----+-----+-----+-----+-----+ So with IPTOS_TOS_MASK 0x1E RT_TOS(tos) ((tos)&IPTOS_TOS_MASK) the first 3 bits DSCP info will get lost. To take all the DSCP info in xmit, we should revert the patch and just push all tos bits to ip_tunnel_ecn_encap(), which will handling ECN field later. Fixes: 71130f2 ("vxlan: fix tos value before xmit") Signed-off-by: Hangbin Liu <[email protected]> Acked-by: Guillaume Nault <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c29f9aa commit a0dced1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/vxlan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
27402740
goto out_unlock;
27412741
}
27422742

2743-
tos = ip_tunnel_ecn_encap(RT_TOS(tos), old_iph, skb);
2743+
tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
27442744
ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
27452745
err = vxlan_build_skb(skb, ndst, sizeof(struct iphdr),
27462746
vni, md, flags, udp_sum);
@@ -2797,7 +2797,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
27972797
goto out_unlock;
27982798
}
27992799

2800-
tos = ip_tunnel_ecn_encap(RT_TOS(tos), old_iph, skb);
2800+
tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
28012801
ttl = ttl ? : ip6_dst_hoplimit(ndst);
28022802
skb_scrub_packet(skb, xnet);
28032803
err = vxlan_build_skb(skb, ndst, sizeof(struct ipv6hdr),

0 commit comments

Comments
 (0)