Skip to contentSkip to conversation

vxlan: fix a regression of igmp join

PATCH Applied Cong Wang 2 participants 2 messages Aug 7, 2013 – Aug 9, 2013

Subsystems (2)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 vxlan: fix a regression of igmp join

From: Cong Wang <[email protected]>

This is a regression introduced by:

	commit 3fc2de2faba387218bdf9dbc6b13f513ac3b060a
	Author: stephen hemminger <[email protected]>
	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 <[email protected]>
Cc David S. Miller <[email protected]>

---

drivers/net/vxlan.c +1 -1
index 8bf31d9..f3ba986 100644
@@ -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);
maintainer Applied
#1 lore raw

From: Cong Wang <[email protected]>
Date: Wed, 7 Aug 2013 16:35:45 +0800

Quoted 17 lines

From: Cong Wang <[email protected]>

This is a regression introduced by:

	commit 3fc2de2faba387218bdf9dbc6b13f513ac3b060a
	Author: stephen hemminger <[email protected]>
	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);
Quoted 6 lines

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

Cc Stephen Hemminger <[email protected]>
Cc David S. Miller <[email protected]>

Applied.