Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[linux-2.6-microblaze.git] / drivers / net / macvlan.c
index 16b43bf..64dfaa3 100644 (file)
@@ -600,6 +600,9 @@ static int macvlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
        if (!vlan->port->passthru)
                return -EOPNOTSUPP;
 
+       if (flags & NLM_F_REPLACE)
+               return -EOPNOTSUPP;
+
        if (is_unicast_ether_addr(addr))
                err = dev_uc_add_excl(dev, addr);
        else if (is_multicast_ether_addr(addr))
@@ -683,7 +686,7 @@ void macvlan_common_setup(struct net_device *dev)
        dev->priv_flags        |= IFF_UNICAST_FLT;
        dev->netdev_ops         = &macvlan_netdev_ops;
        dev->destructor         = free_netdev;
-       dev->header_ops         = &macvlan_hard_header_ops,
+       dev->header_ops         = &macvlan_hard_header_ops;
        dev->ethtool_ops        = &macvlan_ethtool_ops;
 }
 EXPORT_SYMBOL_GPL(macvlan_common_setup);
@@ -820,7 +823,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
                if (port->count)
                        return -EINVAL;
                port->passthru = true;
-               memcpy(dev->dev_addr, lowerdev->dev_addr, ETH_ALEN);
+               eth_hw_addr_inherit(dev, lowerdev);
        }
 
        err = netdev_upper_dev_link(lowerdev, dev);