]> git.baikalelectronics.ru Git - kernel.git/commit
net: check tunnel option type in tunnel flags
authorPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Wed, 27 Jun 2018 04:39:36 +0000 (21:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Jun 2018 14:50:26 +0000 (23:50 +0900)
commit26b7983d676bbcace55f477e29d90dcfb35a9e18
tree7a2a26b4f7f498daa289ea986a0de6ed1fc3c694
parent86edb8b10798b6c0d45ca38ec8abc3a5252285c6
net: check tunnel option type in tunnel flags

Check the tunnel option type stored in tunnel flags when creating options
for tunnels. Thereby ensuring we do not set geneve, vxlan or erspan tunnel
options on interfaces that are not associated with them.

Make sure all users of the infrastructure set correct flags, for the BPF
helper we have to set all bits to keep backward compatibility.

Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/geneve.c
drivers/net/vxlan.c
include/net/ip_tunnels.h
net/core/filter.c
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c
net/openvswitch/flow_netlink.c