From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 08/10] nfs-utils: add IPv6 support to nfssvc_setfds
Date: Wed, 03 Jun 2009 16:16:59 -0400 [thread overview]
Message-ID: <4A26DA3B.3090404@RedHat.com> (raw)
In-Reply-To: <4D598E93-E9CE-4AA7-8289-169FD85EF05B@oracle.com>
Chuck Lever wrote:
>
> On Jun 3, 2009, at 3:52 PM, Jeff Layton wrote:
>
>> Allow nfssvc_setfds to properly deal with AF_INET6.
>>
>> IPv6 sockets for knfsd can't be allowed to accept IPv4 packets. Set the
>> correct option to prevent that from occurring on IPv6 sockets.
>>
>> Signed-off-by: Jeff Layton <jlayton@redhat.com>
>> ---
>> support/nfs/nfssvc.c | 14 ++++++++++++++
>> 1 files changed, 14 insertions(+), 0 deletions(-)
>>
>> diff --git a/support/nfs/nfssvc.c b/support/nfs/nfssvc.c
>> index 89fb5be..19f1a4c 100644
>> --- a/support/nfs/nfssvc.c
>> +++ b/support/nfs/nfssvc.c
>> @@ -76,6 +76,11 @@ nfssvc_setfds(const struct addrinfo *hints, const
>> char *node, const char *port)
>> case AF_INET:
>> family = "inet";
>> break;
>> +#ifdef IPV6_SUPPORTED
>> + case AF_INET6:
>> + family = "inet6";
>> + break;
>> +#endif /* IPV6_SUPPORTED */
>> default:
>> xlog(L_ERROR, "Unknown address family specified: %d\n",
>> hints->ai_family);
>> @@ -123,6 +128,15 @@ nfssvc_setfds(const struct addrinfo *hints, const
>> char *node, const char *port)
>> rc = errno;
>> goto error;
>> }
>> +#ifdef IPV6_SUPPORTED
>> + if (addr->ai_family == AF_INET6 &&
>> + setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &on,
>> sizeof(on))) {
>> + xlog(L_ERROR, "unable to set IPV6_V6ONLY: "
>> + "errno %d (%s)\n", errno, strerror(errno));
>
> I'm still looking at the other patches, but I notice you could use %m
> here too.
I kinda like having both... the errno *and* the error string...
steved.
next prev parent reply other threads:[~2009-06-03 20:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-03 19:52 [PATCH 00/10] nfs-utils: add IPv6 support to rpc.nfsd (try #5) Jeff Layton
2009-06-03 19:52 ` [PATCH 01/10] nfs-utils: don't link libexport.a and libmisc.a to nfsd Jeff Layton
2009-06-03 19:52 ` [PATCH 02/10] nfs-utils: clean up option parsing in nfsd.c Jeff Layton
2009-06-03 19:52 ` [PATCH 03/10] nfs-utils: convert rpc.nfsd to use xlog() Jeff Layton
2009-06-03 20:01 ` Chuck Lever
2009-06-03 20:22 ` Jeff Layton
[not found] ` <20090603162214.2aeed744-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2009-06-03 20:25 ` Steve Dickson
2009-06-03 20:31 ` Jeff Layton
[not found] ` <7968D2B9-3E31-4E0D-9D0B-309D757A0014@oracle.com>
2009-06-04 20:25 ` Jeff Layton
[not found] ` <20090604162534.15db803a-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2009-06-04 20:38 ` Chuck Lever
2009-06-03 19:52 ` [PATCH 04/10] nfs-utils: clean up NFSCTL_* macros for handling protocol bits Jeff Layton
2009-06-03 19:52 ` [PATCH 05/10] nfs-utils: move check for active knfsd to helper function Jeff Layton
2009-06-04 20:00 ` Chuck Lever
2009-06-04 20:29 ` Jeff Layton
2009-06-03 19:52 ` [PATCH 06/10] nfs-utils: convert nfssvc_setfds to use getaddrinfo Jeff Layton
2009-06-04 20:17 ` Chuck Lever
2009-06-04 20:36 ` Jeff Layton
2009-06-03 19:52 ` [PATCH 07/10] nfs-utils: break up the nfssvc interface Jeff Layton
2009-06-03 19:52 ` [PATCH 08/10] nfs-utils: add IPv6 support to nfssvc_setfds Jeff Layton
2009-06-03 20:08 ` Chuck Lever
2009-06-03 20:16 ` Steve Dickson [this message]
[not found] ` <4A26DA3B.3090404-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-06-03 20:20 ` Steve Dickson
2009-06-03 20:24 ` Chuck Lever
2009-06-04 21:00 ` Chuck Lever
2009-06-03 19:52 ` [PATCH 09/10] nfs-utils: add IPv6 support to nfsd Jeff Layton
2009-06-03 19:52 ` [PATCH 10/10] nfs-utils: update the nfsd manpage Jeff Layton
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=4A26DA3B.3090404@RedHat.com \
--to=steved@redhat.com \
--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