netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed
@ 2014-05-29  2:15 Wang Weidong
  2014-05-29  3:51 ` Amos Kong
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Wang Weidong @ 2014-05-29  2:15 UTC (permalink / raw)
  To: David Miller, stephen; +Cc: bridge, netdev, vyasevic

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>
---
 net/bridge/br_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 104a811..a08d2b8 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -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);
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed
  2014-05-29  2:15 [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed Wang Weidong
@ 2014-05-29  3:51 ` Amos Kong
  2014-05-29 13:30 ` Vlad Yasevich
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Amos Kong @ 2014-05-29  3:51 UTC (permalink / raw)
  To: Wang Weidong; +Cc: David Miller, stephen, bridge, netdev, vyasevic

On Thu, May 29, 2014 at 10:15:30AM +0800, Wang Weidong 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).
> 
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
> ---
>  net/bridge/br_if.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
> index 104a811..a08d2b8 100644
> --- a/net/bridge/br_if.c
> +++ b/net/bridge/br_if.c
> @@ -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.

Reviewed-by: Amos Kong <akong@redhat.com>

>  put_back:
>  	dev_put(dev);
>  	kfree(p);
> -- 
> 1.8.4
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
			Amos.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed
  2014-05-29  2:15 [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed Wang Weidong
  2014-05-29  3:51 ` Amos Kong
@ 2014-05-29 13:30 ` Vlad Yasevich
  2014-05-30 14:34 ` Stephen Hemminger
  2014-06-02  5:05 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Vlad Yasevich @ 2014-05-29 13:30 UTC (permalink / raw)
  To: Wang Weidong, David Miller, stephen; +Cc: vyasevic, netdev, bridge

On 05/28/2014 10:15 PM, Wang Weidong 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).
> 
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>

Acked-by: Vlad Yasevich <vyasevic@redhat.com>

Thanks
-vlad

> ---
>  net/bridge/br_if.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
> index 104a811..a08d2b8 100644
> --- a/net/bridge/br_if.c
> +++ b/net/bridge/br_if.c
> @@ -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);
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed
  2014-05-29  2:15 [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed Wang Weidong
  2014-05-29  3:51 ` Amos Kong
  2014-05-29 13:30 ` Vlad Yasevich
@ 2014-05-30 14:34 ` Stephen Hemminger
  2014-06-02  5:05 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2014-05-30 14:34 UTC (permalink / raw)
  To: Wang Weidong; +Cc: David Miller, bridge, netdev, vyasevic

On Thu, 29 May 2014 10:15:30 +0800
Wang Weidong <wangweidong1@huawei.com> 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).
> 
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>

Good catch.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed
  2014-05-29  2:15 [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed Wang Weidong
                   ` (2 preceding siblings ...)
  2014-05-30 14:34 ` Stephen Hemminger
@ 2014-06-02  5:05 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2014-06-02  5:05 UTC (permalink / raw)
  To: wangweidong1; +Cc: stephen, bridge, netdev, vyasevic

From: Wang Weidong <wangweidong1@huawei.com>
Date: Thu, 29 May 2014 10:15:30 +0800

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

Applied, thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-02  5:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-29  2:15 [PATCH net-next] bridge: fix the unbalanced promiscuous count when add_if failed Wang Weidong
2014-05-29  3:51 ` Amos Kong
2014-05-29 13:30 ` Vlad Yasevich
2014-05-30 14:34 ` Stephen Hemminger
2014-06-02  5:05 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).