From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: trond.myklebust@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost)
Date: Fri, 29 Aug 2008 13:25:30 -0400 [thread overview]
Message-ID: <20080829172530.GC7099@fieldses.org> (raw)
In-Reply-To: <20080829172506.GB7099@fieldses.org>
On Fri, Aug 29, 2008 at 01:25:06PM -0400, bfields wrote:
> On Wed, Aug 27, 2008 at 04:56:58PM -0400, Chuck Lever wrote:
> > Based on review comments, I've changed how the NFSv4 callback server
> > starts its listener. If the kernel has IPv6 support, it will start an
> > AF_INET6 listener; otherwise it will start an AF_INET listener.
> >
> > Subsequent lockd IPv6 patches already work this way, it turns out, so
> > I've updated the patch in this subseries that adds a helper to display
> > NLM IPv6 addresses. If an IPv6 address is a mapped IPv4 address, it
> > will be displayed as a dotted-quad instead of as an IPv6 address. This
> > should cause the helper to display IPv4-style addresses on systems that
> > use only IPv4, even though the listener is AF_INET6. This effects
> > only error and debugging messages.
> >
> > I should revisit other areas (already integrated, and in pending
> > patches) which display presentation format addresses, to ensure they
> > follow suit.
>
> I already applied 2-6, so I've removed those and replaced them by your
> new versions. The resulting change is just the following.
Whoops, sorry, I meant:
--b.
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 3f0c1a8..008e402 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -18,6 +18,7 @@
#include <linux/lockd/sm_inter.h>
#include <linux/mutex.h>
+#include <net/ipv6.h>
#define NLMDBG_FACILITY NLMDBG_HOSTCACHE
#define NLM_HOST_NRHASH 32
@@ -65,7 +66,11 @@ static void nlm_display_address(const struct sockaddr *sap,
snprintf(buf, len, NIPQUAD_FMT, NIPQUAD(sin->sin_addr.s_addr));
break;
case AF_INET6:
- snprintf(buf, len, NIP6_FMT, NIP6(sin6->sin6_addr));
+ 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;
default:
snprintf(buf, len, "unsupported address family");
next prev parent reply other threads:[~2008-08-29 17:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-27 20:56 [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost) Chuck Lever
[not found] ` <20080827204852.17837.38361.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-08-27 20:57 ` [PATCH 1/6] NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets Chuck Lever
[not found] ` <20080827205706.17837.28843.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-09-11 21:41 ` J. Bruce Fields
2008-08-27 20:57 ` [PATCH 2/6] NLM: Clean up before introducing new debugging messages Chuck Lever
[not found] ` <20080827205714.17837.95227.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-09-11 21:42 ` J. Bruce Fields
2008-09-11 21:45 ` J. Bruce Fields
2008-08-27 20:57 ` [PATCH 3/6] lockd: address-family independent printable addresses Chuck Lever
2008-08-27 20:57 ` [PATCH 4/6] lockd: Specify address family for source address Chuck Lever
2008-08-27 20:57 ` [PATCH 5/6] lockd: Add address family-agnostic helper for zeroing the port number Chuck Lever
2008-08-27 20:57 ` [PATCH 6/6] SUNRPC: Make svc_addr's argument a constant Chuck Lever
2008-08-29 17:25 ` [PATCH 0/6] 2nd IPv6 patchset for 2.6.28 (repost) J. Bruce Fields
2008-08-29 17:25 ` J. Bruce Fields [this message]
2008-08-29 17:29 ` 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=20080829172530.GC7099@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@netapp.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