mirror of https://gitee.com/openkylin/linux.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 <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
55ce889f96
commit
a88e2676a6
|
@ -703,10 +703,8 @@ static int macvlan_set_mac_address(struct net_device *dev, void *p)
|
||||||
if (!is_valid_ether_addr(addr->sa_data))
|
if (!is_valid_ether_addr(addr->sa_data))
|
||||||
return -EADDRNOTAVAIL;
|
return -EADDRNOTAVAIL;
|
||||||
|
|
||||||
if (vlan->mode == MACVLAN_MODE_PASSTHRU) {
|
if (vlan->mode == MACVLAN_MODE_PASSTHRU)
|
||||||
dev_set_mac_address(vlan->lowerdev, addr);
|
return dev_set_mac_address(vlan->lowerdev, addr);
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return macvlan_sync_address(dev, addr->sa_data);
|
return macvlan_sync_address(dev, addr->sa_data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue