|
|
@@ -608,7 +608,7 @@ static int macvlan_open(struct net_device *dev)
|
|
|
goto hash_add;
|
|
|
}
|
|
|
|
|
|
- err = -EBUSY;
|
|
|
+ err = -EADDRINUSE;
|
|
|
if (macvlan_addr_busy(vlan->port, dev->dev_addr))
|
|
|
goto out;
|
|
|
|
|
|
@@ -706,7 +706,7 @@ static int macvlan_sync_address(struct net_device *dev, unsigned char *addr)
|
|
|
} else {
|
|
|
/* Rehash and update the device filters */
|
|
|
if (macvlan_addr_busy(vlan->port, addr))
|
|
|
- return -EBUSY;
|
|
|
+ return -EADDRINUSE;
|
|
|
|
|
|
if (!macvlan_passthru(port)) {
|
|
|
err = dev_uc_add(lowerdev, addr);
|
|
|
@@ -747,6 +747,9 @@ static int macvlan_set_mac_address(struct net_device *dev, void *p)
|
|
|
return dev_set_mac_address(vlan->lowerdev, addr);
|
|
|
}
|
|
|
|
|
|
+ if (macvlan_addr_busy(vlan->port, addr->sa_data))
|
|
|
+ return -EADDRINUSE;
|
|
|
+
|
|
|
return macvlan_sync_address(dev, addr->sa_data);
|
|
|
}
|
|
|
|