diff options
author | Paolo Abeni <pabeni@redhat.com> | 2018-03-09 04:39:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-09 13:00:08 -0500 |
commit | f5426250a6ecfd1e9b2d5e0daf07565f664aa67d (patch) | |
tree | 581f433bcf7a7a09e5d869aaeeee045bb2725ff5 /drivers/net/ipvlan/ipvlan_main.c | |
parent | d185efc1da089b968dfe1825329c51820d661755 (diff) |
net: introduce IFF_NO_RX_HANDLER
Some network devices - notably ipvlan slave - are not compatible with
any kind of rx_handler. Currently the hook can be installed but any
configuration (bridge, bond, macsec, ...) is nonfunctional.
This change allocates a priv_flag bit to mark such devices and explicitly
forbid installing a rx_handler if such bit is set. The new bit is used
by ipvlan slave device.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_main.c')
-rw-r--r-- | drivers/net/ipvlan/ipvlan_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index 23fd5ab180e8..743d37fb034a 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c | |||
@@ -604,6 +604,8 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev, | |||
604 | */ | 604 | */ |
605 | memcpy(dev->dev_addr, phy_dev->dev_addr, ETH_ALEN); | 605 | memcpy(dev->dev_addr, phy_dev->dev_addr, ETH_ALEN); |
606 | 606 | ||
607 | dev->priv_flags |= IFF_NO_RX_HANDLER; | ||
608 | |||
607 | err = register_netdevice(dev); | 609 | err = register_netdevice(dev); |
608 | if (err < 0) | 610 | if (err < 0) |
609 | return err; | 611 | return err; |