From: Mi Jinlong <mijinlong@cn.fujitsu.com>
To: NFS <linux-nfs@vger.kernel.org>
Cc: "J. Bruce Fields" <bfields@fieldses.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: Tue, 13 Sep 2011 15:45:24 +0800 [thread overview]
Message-ID: <4E6F0A14.1050103@cn.fujitsu.com> (raw)
In-Reply-To: <4E5CABE9.5090401@cn.fujitsu.com>
Hi guys:
What's the situation about those two paths?
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,
next prev parent reply other threads:[~2011-09-13 7:41 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 [this message]
2011-09-14 12:23 ` J. Bruce Fields
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=4E6F0A14.1050103@cn.fujitsu.com \
--to=mijinlong@cn.fujitsu.com \
--cc=SteveD@redhat.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.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).