lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 02 Apr 2013 09:39:49 +0800
From:	Cong Wang <amwang@...hat.com>
To:	Stephen Hemminger <stephen@...workplumber.org>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next v1 3/4] vxlan: add ipv6 support

On Mon, 2013-04-01 at 13:14 -0700, Stephen Hemminger wrote:
> On Sun, 31 Mar 2013 13:43:44 +0800
> Cong Wang <amwang@...hat.com> wrote:
> 
> >  	/* Need to drop RTNL to call multicast leave */
> >  	rtnl_unlock();
> > -	lock_sock(sk);
> > -	err = ip_mc_leave_group(sk, &mreq);
> > +	if (vxlan->gaddr.proto == htons(ETH_P_IP)) {
> > +		lock_sock(sk);
> > +		err = ip_mc_leave_group(sk, &mreq);
> > +	} else {
> > +#if IS_ENABLED(CONFIG_IPV6)
> > +		lock_sock(sk);
> > +		err = ipv6_sock_mc_drop(sk, vxlan->link, &vxlan->gaddr.ip6);
> > +#endif
> > +	}
> >  	release_sock(sk);
> 
> Since both v4 and v6 need socket locked why not?
> 
> 	rtnl_unlock();
> 	lock_sock(sk);
> 	if (vxlan->gaddr.proto == htons(ETH_P_IP)) 
> 		err = ip_mc_leave_group(sk, &mreq);
> if IS_ENABLED(CONFIG_IPV6)
> 	else
> 		err = ipv6_sock_mc_drop(sk, vxlan->link, &vxlan->gaddr.ip6);
> #endif
> 
>   	release_sock(sk);

Oh, of course, I missed that...

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ