From: "J. Bruce Fields" <bfields@fieldses.org>
To: Mi Jinlong <mijinlong@cn.fujitsu.com>
Cc: NFS <linux-nfs@vger.kernel.org>, Jeff Layton <jlayton@redhat.com>,
Chuck Lever <chuck.lever@oracle.com>,
Steve Dickson <SteveD@redhat.com>
Subject: Re: [PATCH 2/2] SUNRPC: compare scopeid for link-local addresses
Date: Wed, 14 Sep 2011 08:23:18 -0400 [thread overview]
Message-ID: <20110914122318.GB3435@fieldses.org> (raw)
In-Reply-To: <4E6F0A14.1050103@cn.fujitsu.com>
On Tue, Sep 13, 2011 at 03:45:24PM +0800, Mi Jinlong wrote:
> Hi guys:
>
> What's the situation about those two paths?
Apologies for the delay; both look reasonable to me, thanks. Applying
for 3.2. (May be a few days before I push it out to my public tree.)
--b.
>
>
> thanks,
> Mi Jinlong
>
> Mi Jinlong:
> > For ipv6 link-local addresses, sunrpc do not compare those scope id.
> > This patch let sunrpc compares scope id only on link-local addresses.
> >
> > Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
> > ---
> > include/linux/sunrpc/clnt.h | 8 +++++++-
> > 1 files changed, 7 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
> > index db7bcaf..ee1bb67 100644
> > --- a/include/linux/sunrpc/clnt.h
> > +++ b/include/linux/sunrpc/clnt.h
> > @@ -218,7 +218,13 @@ static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1,
> > {
> > const struct sockaddr_in6 *sin1 = (const struct sockaddr_in6 *)sap1;
> > const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2;
> > - return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr);
> > +
> > + if (!ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr))
> > + return false;
> > + else if (ipv6_addr_type(&sin1->sin6_addr) & IPV6_ADDR_LINKLOCAL)
> > + return sin1->sin6_scope_id == sin2->sin6_scope_id;
> > +
> > + return true;
> > }
> >
> > static inline bool __rpc_copy_addr6(struct sockaddr *dst,
>
prev parent reply other threads:[~2011-09-14 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 9:22 [PATCH 2/2] SUNRPC: compare scopeid for link-local addresses Mi Jinlong
2011-08-30 10:07 ` Jeff Layton
2011-08-30 14:28 ` Chuck Lever
2011-08-30 15:05 ` Chuck Lever
2011-09-13 7:45 ` Mi Jinlong
2011-09-14 12:23 ` J. Bruce Fields [this message]
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=20110914122318.GB3435@fieldses.org \
--to=bfields@fieldses.org \
--cc=SteveD@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=mijinlong@cn.fujitsu.com \
/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).