Commit a88e2676 authored by Zhang Shengju's avatar Zhang Shengju Committed by David S. Miller

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: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 55ce889f
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment