提交 c3891fa2 编写于 作者: G Gao Feng 提交者: David S. Miller

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: NGao Feng <fgao@ikuai8.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ffa54a23
...@@ -623,6 +623,7 @@ static int macvlan_open(struct net_device *dev) ...@@ -623,6 +623,7 @@ static int macvlan_open(struct net_device *dev)
return 0; return 0;
clear_multi: clear_multi:
if (dev->flags & IFF_ALLMULTI)
dev_set_allmulti(lowerdev, -1); dev_set_allmulti(lowerdev, -1);
del_unicast: del_unicast:
dev_uc_del(lowerdev, dev->dev_addr); dev_uc_del(lowerdev, dev->dev_addr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册