diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2019-03-26 18:22:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-28 06:54:38 +0100 |
commit | 1017e0987117c32783ba7c10fe2e7ff1456ba1dc (patch) | |
tree | 09ef26329b4bbf9519c6359793c56c729d176086 /drivers/net/vrf.c | |
parent | Merge branch 'thunderx-fix-receive-buffer-page-recycling' (diff) | |
download | linux-1017e0987117c32783ba7c10fe2e7ff1456ba1dc.tar.xz linux-1017e0987117c32783ba7c10fe2e7ff1456ba1dc.zip |
vrf: prevent adding upper devices
VRF devices don't work with upper devices. Currently, it's possible to
add a VRF device to a bridge or team, and to create macvlan, macsec, or
ipvlan devices on top of a VRF (bond and vlan are prevented respectively
by the lack of an ndo_set_mac_address op and the NETIF_F_VLAN_CHALLENGED
feature flag).
Fix this by setting the IFF_NO_RX_HANDLER flag (introduced in commit
f5426250a6ec ("net: introduce IFF_NO_RX_HANDLER")).
Cc: David Ahern <dsahern@gmail.com>
Fixes: 193125dbd8eb ("net: Introduce VRF device driver")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vrf.c')
-rw-r--r-- | drivers/net/vrf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 7c1430ed0244..6d1a1abbed27 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -1273,6 +1273,7 @@ static void vrf_setup(struct net_device *dev) /* default to no qdisc; user can add if desired */ dev->priv_flags |= IFF_NO_QUEUE; + dev->priv_flags |= IFF_NO_RX_HANDLER; dev->min_mtu = 0; dev->max_mtu = 0; |