]> git.baikalelectronics.ru Git - kernel.git/commit
vxlan: fix tos value before xmit
authorHangbin Liu <liuhangbin@gmail.com>
Thu, 2 Jan 2020 09:23:45 +0000 (17:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jan 2020 00:35:48 +0000 (16:35 -0800)
commit6f031e6b7c58c0cf11e679389a547321149f4faa
tree827941bb65c473cb13f410e6934a71d3715ab2fc
parentba663b2c4a6957906df0f51a674fcbebf30cc914
vxlan: fix tos value before xmit

Before ip_tunnel_ecn_encap() and udp_tunnel_xmit_skb() we should filter
tos value by RT_TOS() instead of using config tos directly.

vxlan_get_route() would filter the tos to fl4.flowi4_tos but we didn't
return it back, as geneve_get_v4_rt() did. So we have to use RT_TOS()
directly in function ip_tunnel_ecn_encap().

Fixes: 522b72544f99 ("VXLAN: Use IP Tunnels tunnel ENC encap API")
Fixes: cbd781486edd ("vxlan: allow setting ipv6 traffic class")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c