From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 01/14] NLM: Beef up NLM address display function
Date: Wed, 29 Oct 2008 15:25:14 -0400 [thread overview]
Message-ID: <20081029192514.GA1406@fieldses.org> (raw)
In-Reply-To: <20081024180954.23810.34150.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
On Fri, Oct 24, 2008 at 02:09:54PM -0400, Chuck Lever wrote:
> Add support for IPv6 addresses with a scope ID,
I remain a bit confused about scope ID's. If you tell me they're
needed, I'll believe you.
> and enable calls from outside of fs/lockd/host.c
Some day of course it'd be nice to collect all the basic "display an
ipv6 address" code together in one place!
> diff --git a/fs/lockd/host.c b/fs/lockd/host.c
> index 9fd8889..c7516ae 100644
> --- a/fs/lockd/host.c
> +++ b/fs/lockd/host.c
> @@ -104,29 +104,54 @@ static void nlm_clear_port(struct sockaddr *sap)
> }
> }
>
> -static void nlm_display_address(const struct sockaddr *sap,
...
> +int nlm_display_address(const struct sockaddr *sap, char *buf,
The return value is never used, even after your other patches. Do you
have any plans to use it?
--b.
> + const size_t len)
> +{
> switch (sap->sa_family) {
> case AF_UNSPEC:
> - snprintf(buf, len, "unspecified");
> - break;
> + snprintf(buf, len, "unspecified address");
> + return -EAFNOSUPPORT;
> case AF_INET:
> - snprintf(buf, len, NIPQUAD_FMT, NIPQUAD(sin->sin_addr.s_addr));
> - break;
> + return nlm_display_ipv4_address(sap, buf, len);
> case AF_INET6:
> - if (ipv6_addr_v4mapped(&sin6->sin6_addr))
> - snprintf(buf, len, NIPQUAD_FMT,
> - NIPQUAD(sin6->sin6_addr.s6_addr32[3]));
> - else
> - snprintf(buf, len, NIP6_FMT, NIP6(sin6->sin6_addr));
> - break;
> + return nlm_display_ipv6_address(sap, buf, len);
> default:
> snprintf(buf, len, "unsupported address family");
> - break;
> + return -EAFNOSUPPORT;
> }
> }
next prev parent reply other threads:[~2008-10-29 19:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 18:09 [PATCH 00/14] RFC: IPv6 support for kernel NSM Chuck Lever
[not found] ` <20081024180150.23810.9718.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-10-24 18:09 ` [PATCH 01/14] NLM: Beef up NLM address display function Chuck Lever
[not found] ` <20081024180954.23810.34150.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-10-29 19:25 ` J. Bruce Fields [this message]
2008-10-29 20:05 ` Chuck Lever
2008-10-24 18:10 ` [PATCH 02/14] NSM: Move nsm_find() to fs/lockd/mon.c Chuck Lever
2008-10-24 18:10 ` [PATCH 03/14] NSM: Support IPv6 version of mon_name Chuck Lever
[not found] ` <20081024181009.23810.56793.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-10-29 20:00 ` J. Bruce Fields
2008-10-29 20:22 ` Chuck Lever
2008-10-24 18:10 ` [PATCH 04/14] NSM: Move NSM-related function and variable declarations to lockd.h Chuck Lever
[not found] ` <20081024181016.23810.69413.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-10-29 20:02 ` J. Bruce Fields
2008-10-24 18:10 ` [PATCH 05/14] NSM: Move NSM-related XDR data structures to lockd's xdr.h Chuck Lever
2008-10-24 18:10 ` [PATCH 06/14] NSM: Move NSM program and procedure numbers to fs/lockd/mon.c Chuck Lever
2008-10-24 18:10 ` [PATCH 07/14] NSM: Generate "priv" argument when nsm_handle is created Chuck Lever
2008-10-24 18:10 ` [PATCH 08/14] NLM: Change nlm_host_rebooted() to take a single nlm_reboot argument Chuck Lever
2008-10-24 18:10 ` [PATCH 09/14] NLM: Decode "priv" argument of NLM_SM_NOTIFY as an opaque Chuck Lever
2008-10-24 18:11 ` [PATCH 10/14] NSM: Add nsm_lookup() function Chuck Lever
2008-10-24 18:11 ` [PATCH 11/14] NSM: Replace IP address as our nlm_reboot lookup key Chuck Lever
2008-10-24 18:11 ` [PATCH 12/14] NSM: Remove include/linux/lockd/sm_inter.h Chuck Lever
2008-10-24 18:11 ` [PATCH 13/14] NLM: Remove "create" argument from nsm_find() Chuck Lever
[not found] ` <20081024181123.23810.65076.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-10-29 20:48 ` J. Bruce Fields
2008-10-24 18:11 ` [PATCH 14/14] NSM: Use same helpers in nsm_get_handle() and nsm_lookup_rebooted() Chuck Lever
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=20081029192514.GA1406@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.