summaryrefslogtreecommitdiffstats
path: root/utils/statd/hostname.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2010-10-28 12:12:12 -0400
committerSteve Dickson <steved@redhat.com>2010-11-01 08:05:14 -0400
commit1ea2c3be33f2eb4630c5cdb78edf2bb670b294ab (patch)
tree37422ba858cffebe289604c67c83ac8fb5047ff7 /utils/statd/hostname.c
parentf8e315543b7f1db7f37a4bfe8ede3020cef62868 (diff)
downloadnfs-utils-1ea2c3be33f2eb4630c5cdb78edf2bb670b294ab.tar.gz
nfs-utils-1ea2c3be33f2eb4630c5cdb78edf2bb670b294ab.tar.xz
nfs-utils-1ea2c3be33f2eb4630c5cdb78edf2bb670b294ab.zip
nfs-utils: Remove all uses of AI_ADDRCONFIG
It was reported that, if only "lo" is up, mount.nfs 127.0.0.1:/export /mount fails with "Name or service not known". "man 3 getaddrinfo" says this: If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4 addresses are returned in the list pointed to by res only if the local system has at least one IPv4 address configured, and IPv6 addresses are only returned if the local system has at least one IPv6 address configured. The man page oversimplifies here. A review of glibc shows that getaddrinfo(3) explicitly ignores loopback addresses when deciding whether an IPv4 or IPv6 address is configured. This behavior around loopback is a problem not just for mount.nfs, but also for RPC daemons that have to start up before a system's networking is fully configured and started. Given the history of other problems with AI_ADDRCONFIG and the unpredictable behavior it introduces, let's just remove it everywhere in nfs-utils. This fix addresses: https://bugzilla.linux-nfs.org/show_bug.cgi?id=191 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/statd/hostname.c')
-rw-r--r--utils/statd/hostname.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/utils/statd/hostname.c b/utils/statd/hostname.c
index 38f2265..616a3cb 100644
--- a/utils/statd/hostname.c
+++ b/utils/statd/hostname.c
@@ -39,10 +39,6 @@
#include "statd.h"
#include "xlog.h"
-#ifndef HAVE_DECL_AI_ADDRCONFIG
-#define AI_ADDRCONFIG 0
-#endif
-
/**
* statd_present_address - convert sockaddr to presentation address
* @sap: pointer to socket address to convert