From: Jeff Layton <jlayton@redhat.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfsd: NFS fails to come up then the network is down.
Date: Thu, 12 Nov 2009 14:28:52 -0500 [thread overview]
Message-ID: <20091112142852.51721c7e@barsoom.rdu.redhat.com> (raw)
In-Reply-To: <4AFC60AA.4030502-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
On Thu, 12 Nov 2009 14:23:22 -0500
Steve Dickson <SteveD@redhat.com> wrote:
> In some recent testing it appears nfsd fails to come up
> when an non-loopback network interface is not configured.
> This patch solves the problem.
>
> steved.
>
> commit 2905358524c0835311501bad04c521479b0525ff
> Author: Steve Dickson <steved@redhat.com>
> Date: Thu Nov 12 14:16:12 2009 -0500
>
> Remove the AI_ADDRCONFIG hint flag to getaddrinfo() when it's
> call by nfsd to set up the file descriptors that are
> sent to the kernel. The flag causes the getaddrinfo()
> to fail, with EAI_NONAME, when there is not a non-loopback
> network interface configured.
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
>
> diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
> index 12d3253..b8028bb 100644
> --- a/utils/nfsd/nfssvc.c
> +++ b/utils/nfsd/nfssvc.c
> @@ -212,7 +212,7 @@ int
> nfssvc_set_sockets(const int family, const unsigned int protobits,
> const char *host, const char *port)
> {
> - struct addrinfo hints = { .ai_flags = AI_PASSIVE | AI_ADDRCONFIG };
> + struct addrinfo hints = { .ai_flags = AI_PASSIVE };
>
> hints.ai_family = family;
>
Patch looks correct. I think AI_ADDRCONFIG is superfluous here. nfsd
already limits what sockets it tries to hand off to the kernel based on
the contents of /etc/netconfig so there should be no problem removing
that flag.
Acked-by: Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2009-11-12 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 19:23 [PATCH] nfsd: NFS fails to come up then the network is down Steve Dickson
[not found] ` <4AFC60AA.4030502-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-11-12 19:28 ` Jeff Layton [this message]
2009-11-12 19:52 ` Steve Dickson
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=20091112142852.51721c7e@barsoom.rdu.redhat.com \
--to=jlayton@redhat.com \
--cc=SteveD@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