Commit 019ee792 authored by wangweidong's avatar wangweidong Committed by David S. Miller

bridge: fix the unbalanced promiscuous count when add_if failed

As commit 2796d0c6 ("bridge: Automatically manage port
promiscuous mode."), make the add_if use dev_set_allmulti
instead of dev_set_promiscuous, so when add_if failed, we
should do dev_set_allmulti(dev, -1).
Signed-off-by: default avatarWang Weidong <wangweidong1@huawei.com>
Reviewed-by: default avatarAmos Kong <akong@redhat.com>
Acked-by: default avatarVlad Yasevich <vyasevic@redhat.com>
Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ee39facb
......@@ -528,7 +528,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
kobject_put(&p->kobj);
p = NULL; /* kobject_put frees */
err1:
dev_set_promiscuity(dev, -1);
dev_set_allmulti(dev, -1);
put_back:
dev_put(dev);
kfree(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment