Skip to content

Commit

Permalink
macvlan: propagate the mac address change status for lowerdev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhang Shengju authored and David S. Miller committed Jun 14, 2017
1 parent 55ce889 commit a88e267
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a88e267

Please sign in to comment.