bridge: fix the unbalanced promiscuous count when add_if failed
authorwangweidong <wangweidong1@huawei.com>
Thu, 29 May 2014 02:15:30 +0000 (10:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Jun 2014 05:05:16 +0000 (22:05 -0700)
As commit 2796d0c648c94 ("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: Wang Weidong <wangweidong1@huawei.com>
Reviewed-by: Amos Kong <akong@redhat.com>
Acked-by: Vlad Yasevich <vyasevic@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_if.c

index 104a811dde571173973d7082c2b1886fa4a44647..a08d2b8ebba63358979d517ee993d7ed3895ef41 100644 (file)
@@ -528,7 +528,7 @@ err2:
        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);