netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net-next] vxlan: fix a regression of igmp join
@ 2013-08-07  8:35 Cong Wang
  2013-08-09 18:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2013-08-07  8:35 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Stephen Hemminger, Cong Wang

From: Cong Wang <amwang@redhat.com>

This is a regression introduced by:

	commit 3fc2de2faba387218bdf9dbc6b13f513ac3b060a
	Author: stephen hemminger <stephen@networkplumber.org>
	Date:   Thu Jul 18 08:40:15 2013 -0700

	    vxlan: fix igmp races

Before this commit, the old code was:

       if (vxlan_group_used(vn, vxlan->default_dst.remote_ip))
               ip_mc_join_group(sk, &mreq);
       else
               ip_mc_leave_group(sk, &mreq);

therefore we shoud check vxlan_group_used(), not its opposite,
for igmp_join.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>

---
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 8bf31d9..f3ba986 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1430,7 +1430,7 @@ static int vxlan_open(struct net_device *dev)
 		return -ENOTCONN;
 
 	if (IN_MULTICAST(ntohl(vxlan->default_dst.remote_ip)) &&
-	    ! vxlan_group_used(vn, vxlan->default_dst.remote_ip)) {
+	    vxlan_group_used(vn, vxlan->default_dst.remote_ip)) {
 		vxlan_sock_hold(vs);
 		dev_hold(dev);
 		queue_work(vxlan_wq, &vxlan->igmp_join);

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

* Re: [Patch net-next] vxlan: fix a regression of igmp join
  2013-08-07  8:35 [Patch net-next] vxlan: fix a regression of igmp join Cong Wang
@ 2013-08-09 18:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-08-09 18:42 UTC (permalink / raw)
  To: amwang; +Cc: netdev, stephen

From: Cong Wang <amwang@redhat.com>
Date: Wed,  7 Aug 2013 16:35:45 +0800

> From: Cong Wang <amwang@redhat.com>
> 
> This is a regression introduced by:
> 
> 	commit 3fc2de2faba387218bdf9dbc6b13f513ac3b060a
> 	Author: stephen hemminger <stephen@networkplumber.org>
> 	Date:   Thu Jul 18 08:40:15 2013 -0700
> 
> 	    vxlan: fix igmp races
> 
> Before this commit, the old code was:
> 
>        if (vxlan_group_used(vn, vxlan->default_dst.remote_ip))
>                ip_mc_join_group(sk, &mreq);
>        else
>                ip_mc_leave_group(sk, &mreq);
> 
> therefore we shoud check vxlan_group_used(), not its opposite,
> for igmp_join.
> 
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>

Applied.

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

end of thread, other threads:[~2013-08-09 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-07  8:35 [Patch net-next] vxlan: fix a regression of igmp join Cong Wang
2013-08-09 18:42 ` 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).