Skip to contentSkip to conversation

bridge: fix the unbalanced promiscuous count when add_if failed

PATCH Applied Wang Weidong 5 participants 5 messages May 29, 2014 – Jun 2, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 104a811..a08d2b8 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Wang Weidong

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 +0 -0
index 104a811..a08d2b8 100644

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 -0
 put_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.
Acked-by on v1 1/1
#2 lore raw
In reply to Wang Weidong
Quoted 6 lines · Wang Weidong

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).

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
index 104a811..a08d2b8 100644
@@ -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);
Acked-by on v1 1/1
#3 lore raw
In reply to Wang Weidong
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_if use dev_set_allmulti instead of dev_set_promiscuous, so when add_if failed, we should do dev_set_allmulti(dev, -1).

Good catch.