From: Cong Wang <amwang@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: Re: [Patch net-next v1 3/4] vxlan: add ipv6 support
Date: Tue, 02 Apr 2013 09:39:49 +0800 [thread overview]
Message-ID: <1364866789.17029.2.camel@cr0> (raw)
In-Reply-To: <20130401131450.5d6bbc1e@nehalam.linuxnetplumber.net>
On Mon, 2013-04-01 at 13:14 -0700, Stephen Hemminger wrote:
> On Sun, 31 Mar 2013 13:43:44 +0800
> Cong Wang <amwang@redhat.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!
next prev parent reply other threads:[~2013-04-02 1:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-31 5:43 [Patch net-next v1 1/4] vxlan: defer vxlan init as late as possible Cong Wang
2013-03-31 5:43 ` [Patch net-next v1 2/4] ipv6: export ipv6_sock_mc_join and ipv6_sock_mc_drop Cong Wang
2013-03-31 5:43 ` [Patch net-next v1 3/4] vxlan: add ipv6 support Cong Wang
2013-04-01 15:19 ` David Stevens
2013-04-01 15:36 ` Stephen Hemminger
2013-04-01 17:02 ` David Miller
2013-04-01 18:05 ` David Stevens
2013-04-01 18:15 ` David Miller
2013-04-01 20:03 ` David Stevens
2013-04-01 20:05 ` David Miller
2013-04-02 1:46 ` Cong Wang
2013-04-02 13:13 ` David Stevens
2013-04-01 20:14 ` Stephen Hemminger
2013-04-02 1:39 ` Cong Wang [this message]
2013-03-31 5:43 ` [Patch net-next v1 4/4] ipv6: Add generic UDP Tunnel segmentation Cong Wang
2013-03-31 6:17 ` [PATCH iproute2] vxlan: add ipv6 support Cong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364866789.17029.2.camel@cr0 \
--to=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).