OSDN Git Service

macvlan: propagate the mac address change status for lowerdev
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>
Tue, 13 Jun 2017 14:45:11 +0000 (22:45 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Jun 2017 18:34:51 +0000 (14:34 -0400)
The macvlan dev should propagate the return value of mac address change for
lower device in the passthru mode, instead of always return 0.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c

index 346ad2f..ade1213 100644 (file)
@@ -703,10 +703,8 @@ static int macvlan_set_mac_address(struct net_device *dev, void *p)
        if (!is_valid_ether_addr(addr->sa_data))
                return -EADDRNOTAVAIL;
 
-       if (vlan->mode == MACVLAN_MODE_PASSTHRU) {
-               dev_set_mac_address(vlan->lowerdev, addr);
-               return 0;
-       }
+       if (vlan->mode == MACVLAN_MODE_PASSTHRU)
+               return dev_set_mac_address(vlan->lowerdev, addr);
 
        return macvlan_sync_address(dev, addr->sa_data);
 }