nfsd: NFS fails to come up then the network is down.
Subsystems (2)
PATCH 1/1 nfsd: NFS fails to come up then the network is down.
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 <[email protected]> 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.
utils/nfsd/nfssvc.c +1 -1
@@ -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;
Jeff Layton
Acked-byQuoted 23 lines · On Thu, 12 Nov 2009 14:23:22 -0500 Steve Dickson <[email protected]> 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
2905358524c0835311501bad04c521479b0525ffAuthor: Steve Dickson <[email protected]> Date: Thu Nov 12 14:16:12 2009 -0500Remove the
AI_ADDRCONFIGhint flag togetaddrinfo()when it's call by nfsd to set up the file descriptors that are sent to the kernel. The flag causes thegetaddrinfo()to fail, withEAI_NONAME, when there is not a non-loopback network interface configured.Signed-off-by Steve Dickson <[email protected]>utils/nfsd/nfssvc.c +0
-0
utils/nfsd/nfssvc.c int · line 218
Quoted 8 lines
utils/nfsd/nfssvc.c +1
-1@@ -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.
Quoted 23 lines · Steve Dickson
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
2905358524c0835311501bad04c521479b0525ffAuthor: Steve Dickson <[email protected]> Date: Thu Nov 12 14:16:12 2009 -0500Remove the
AI_ADDRCONFIGhint flag togetaddrinfo()when it's call by nfsd to set up the file descriptors that are sent to the kernel. The flag causes thegetaddrinfo()to fail, withEAI_NONAME, when there is not a non-loopback network interface configured.Signed-off-by Steve Dickson <[email protected]>utils/nfsd/nfssvc.c +0
-0
utils/nfsd/nfssvc.c int · line 218
Quoted 8 lines
utils/nfsd/nfssvc.c +1
-1@@ -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.