aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGao Feng <fgao@ikuai8.com>2016-11-22 09:54:36 +0800
committerDavid S. Miller <davem@davemloft.net>2016-11-23 20:18:36 -0500
commitc3891fa2543cbab26093f5e425b8a50cd6837f16 (patch)
tree17764f348b48b64d692b8ada70d274ed85c72b8c /drivers
parentnet: phy: micrel: fix KSZ8041FTL supported value (diff)
downloadlinux-dev-c3891fa2543cbab26093f5e425b8a50cd6837f16.tar.xz
linux-dev-c3891fa2543cbab26093f5e425b8a50cd6837f16.zip
driver: macvlan: Check if need rollback multicast setting in macvlan_open
When dev_set_promiscuity failed in macvlan_open, it always invokes dev_set_allmulti without checking if necessary. Now check the IFF_ALLMULTI flag firstly before rollback the multicast setting in the error handler. Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/macvlan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index d2d6f12a112f..26d6f0bbe14b 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -623,7 +623,8 @@ hash_add:
return 0;
clear_multi:
- dev_set_allmulti(lowerdev, -1);
+ if (dev->flags & IFF_ALLMULTI)
+ dev_set_allmulti(lowerdev, -1);
del_unicast:
dev_uc_del(lowerdev, dev->dev_addr);
out: