[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130401131450.5d6bbc1e@nehalam.linuxnetplumber.net>
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