vxlan: fix a regression of igmp join
This is a regression introduced by:
commit 3fc2de2fab
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
288a937637
commit
614334df2d
|
@ -1386,7 +1386,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);
|
||||
|
|
Loading…
Reference in New Issue