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:	Mon, 1 Apr 2013 13:14:50 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Cong Wang <amwang@...hat.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next v1 3/4] vxlan: add ipv6 support

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