diff options
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_main.c')
-rw-r--r-- | drivers/net/ipvlan/ipvlan_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index 4cbe9e27287d..23fd5ab180e8 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c | |||
@@ -129,7 +129,6 @@ static int ipvlan_port_create(struct net_device *dev) | |||
129 | if (err) | 129 | if (err) |
130 | goto err; | 130 | goto err; |
131 | 131 | ||
132 | dev->priv_flags |= IFF_IPVLAN_MASTER; | ||
133 | return 0; | 132 | return 0; |
134 | 133 | ||
135 | err: | 134 | err: |
@@ -142,7 +141,6 @@ static void ipvlan_port_destroy(struct net_device *dev) | |||
142 | struct ipvl_port *port = ipvlan_port_get_rtnl(dev); | 141 | struct ipvl_port *port = ipvlan_port_get_rtnl(dev); |
143 | struct sk_buff *skb; | 142 | struct sk_buff *skb; |
144 | 143 | ||
145 | dev->priv_flags &= ~IFF_IPVLAN_MASTER; | ||
146 | if (port->mode == IPVLAN_MODE_L3S) { | 144 | if (port->mode == IPVLAN_MODE_L3S) { |
147 | dev->priv_flags &= ~IFF_L3MDEV_MASTER; | 145 | dev->priv_flags &= ~IFF_L3MDEV_MASTER; |
148 | ipvlan_unregister_nf_hook(dev_net(dev)); | 146 | ipvlan_unregister_nf_hook(dev_net(dev)); |
@@ -423,6 +421,12 @@ static const struct header_ops ipvlan_header_ops = { | |||
423 | .cache_update = eth_header_cache_update, | 421 | .cache_update = eth_header_cache_update, |
424 | }; | 422 | }; |
425 | 423 | ||
424 | static bool netif_is_ipvlan(const struct net_device *dev) | ||
425 | { | ||
426 | /* both ipvlan and ipvtap devices use the same netdev_ops */ | ||
427 | return dev->netdev_ops == &ipvlan_netdev_ops; | ||
428 | } | ||
429 | |||
426 | static int ipvlan_ethtool_get_link_ksettings(struct net_device *dev, | 430 | static int ipvlan_ethtool_get_link_ksettings(struct net_device *dev, |
427 | struct ethtool_link_ksettings *cmd) | 431 | struct ethtool_link_ksettings *cmd) |
428 | { | 432 | { |
@@ -600,8 +604,6 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev, | |||
600 | */ | 604 | */ |
601 | memcpy(dev->dev_addr, phy_dev->dev_addr, ETH_ALEN); | 605 | memcpy(dev->dev_addr, phy_dev->dev_addr, ETH_ALEN); |
602 | 606 | ||
603 | dev->priv_flags |= IFF_IPVLAN_SLAVE; | ||
604 | |||
605 | err = register_netdevice(dev); | 607 | err = register_netdevice(dev); |
606 | if (err < 0) | 608 | if (err < 0) |
607 | return err; | 609 | return err; |