[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1497365111-34821-1-git-send-email-zhangshengju@cmss.chinamobile.com>
Date: Tue, 13 Jun 2017 22:45:11 +0800
From: Zhang Shengju <zhangshengju@...s.chinamobile.com>
To: davem@...emloft.net, fgao@...ai8.com, vyasevic@...hat.com,
netdev@...r.kernel.org
Subject: [net-next] 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@...s.chinamobile.com>
---
drivers/net/macvlan.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 346ad2f..ade1213 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);
}
--
1.8.3.1
Powered by blists - more mailing lists