bridge: fix the unbalanced promiscuous count when add_if failed
Subsystems (3)
PATCH 1/1 bridge: fix the unbalanced promiscuous count when add_if failed
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).
--- net/bridge/br_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_if.c +1 -1
@@ -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);
Signature · 1 line
1.8.4
Quoted 15 lines · Wang Weidong
As commit 2796d0c648c94("bridge: Automatically manage port promiscuous mode."), make the
add_ifusedev_set_allmultiinstead ofdev_set_promiscuous, so whenadd_iffailed, we should dodev_set_allmulti(dev, -1).Signed-off-by Wang Weidong <[email protected]>--- net/bridge/br_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/bridge/br_if.c +0
-0
net/bridge/br_if.c err2: · line 531
Quoted 5 lines
net/bridge/br_if.c +1
-1@@ -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 );
Right fix.
Quoted 11 lines
net/bridge/br_if.c +0
-0put_back:dev_put (dev);kfree (p);Signature · 7 lines
1.8.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Amos.
Quoted 6 lines · Wang Weidong
As commit 2796d0c648c94("bridge: Automatically manage port promiscuous mode."), make the
add_ifusedev_set_allmultiinstead ofdev_set_promiscuous, so whenadd_iffailed, we should dodev_set_allmulti(dev, -1).Signed-off-by Wang Weidong <[email protected]>
Thanks
-vlad
Quoted 18 lines
--- net/bridge/br_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/bridge/br_if.c +1
-1@@ -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);
Quoted 6 lines · On Thu, 29 May 2014 10:15:30 +0800 Wang Weidong <[email protected]> wrote:
As commit 2796d0c648c94("bridge: Automatically manage port promiscuous mode."), make the
add_ifusedev_set_allmultiinstead ofdev_set_promiscuous, so whenadd_iffailed, we should dodev_set_allmulti(dev, -1).Signed-off-by Wang Weidong <[email protected]>
Good catch.
From: Wang Weidong <[email protected]>
Date: Thu, 29 May 2014 10:15:30 +0800
Quoted 6 lines
As commit 2796d0c648c94("bridge: Automatically manage port promiscuous mode."), make the
add_ifusedev_set_allmultiinstead ofdev_set_promiscuous, so whenadd_iffailed, we should dodev_set_allmulti(dev, -1).Signed-off-by Wang Weidong <[email protected]>
Applied, thank you.