net: use eth_hw_addr_random() and reset addr_assign_type
[deliverable/linux.git] / drivers / net / macvlan.c
index 9ea99217f11609176d56459c3e35f55185e6f2af..f975afdc315ce507b5a5b80c04325a224849c320 100644 (file)
@@ -372,6 +372,7 @@ static int macvlan_set_mac_address(struct net_device *dev, void *p)
 
        if (!(dev->flags & IFF_UP)) {
                /* Just copy in the new address */
+               dev->addr_assign_type &= ~NET_ADDR_RANDOM;
                memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
        } else {
                /* Rehash and update the device filters */
@@ -687,7 +688,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
                return -EINVAL;
 
        if (!tb[IFLA_ADDRESS])
-               random_ether_addr(dev->dev_addr);
+               eth_hw_addr_random(dev);
 
        if (!macvlan_port_exists(lowerdev)) {
                err = macvlan_port_create(lowerdev);
This page took 0.026433 seconds and 5 git commands to generate.