diff options
author | Zhang Shengju <zhangshengju@cmss.chinamobile.com> | 2017-06-13 16:45:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-14 20:34:51 +0200 |
commit | a88e2676a6cd3352c2f590f872233d83d8db289c (patch) | |
tree | 8361bd0c1fcad8072be805785c0bf7c3ba0c9b6e /drivers | |
parent | Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirshe... (diff) | |
download | linux-a88e2676a6cd3352c2f590f872233d83d8db289c.tar.xz linux-a88e2676a6cd3352c2f590f872233d83d8db289c.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/macvlan.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); } |