public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsd: NFS fails to come up then the network is down.
@ 2009-11-12 19:23 Steve Dickson
       [not found] ` <4AFC60AA.4030502-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Dickson @ 2009-11-12 19:23 UTC (permalink / raw)
  To: Linux NFS Mailing list

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;
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nfsd: NFS fails to come up then the network is down.
       [not found] ` <4AFC60AA.4030502-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
@ 2009-11-12 19:28   ` Jeff Layton
  2009-11-12 19:52   ` Steve Dickson
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2009-11-12 19:28 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Linux NFS Mailing list

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nfsd: NFS fails to come up then the network is down.
       [not found] ` <4AFC60AA.4030502-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
  2009-11-12 19:28   ` Jeff Layton
@ 2009-11-12 19:52   ` Steve Dickson
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2009-11-12 19:52 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Linux NFS Mailing list



On 11/12/2009 02:23 PM, Steve Dickson 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;
>  

Committed...

steved.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-12 19:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-11-12 19:52   ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox