From: Zhang Shengju Date: Tue, 13 Jun 2017 14:45:11 +0000 (+0800) Subject: macvlan: propagate the mac address change status for lowerdev X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a88e2676a6cd3352c2f590f872233d83d8db289c;p=openwrt%2Fstaging%2Fblogic.git macvlan: propagate the mac address change status for lowerdev 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 346ad2ff3998..ade1213e8a87 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -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); }