summaryrefslogtreecommitdiffstats
path: root/sbin/nfsd
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-03-25 23:28:03 +0000
committeralfred <alfred@FreeBSD.org>2001-03-25 23:28:03 +0000
commit20ed2193f0512f5cdd0fcea29386e8d5421cec77 (patch)
treea7589e8b0cfc582778e2f32fd8bffb13d2b85bed /sbin/nfsd
parentc7987ad3717aeedbeff9eaf5028553678c983448 (diff)
downloadFreeBSD-src-20ed2193f0512f5cdd0fcea29386e8d5421cec77.zip
FreeBSD-src-20ed2193f0512f5cdd0fcea29386e8d5421cec77.tar.gz
Disable ipv6 when getnetconfigent("udp6"/"tcp6") fails.
Submitted by: Martin Blapp <mb@imp.ch>
Diffstat (limited to 'sbin/nfsd')
-rw-r--r--sbin/nfsd/nfsd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c
index 959f0fb..d8d4e04 100644
--- a/sbin/nfsd/nfsd.c
+++ b/sbin/nfsd/nfsd.c
@@ -256,7 +256,8 @@ main(argc, argv, envp)
ip6flag = 1;
s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
if (s < 0 && (errno == EPROTONOSUPPORT ||
- errno == EPFNOSUPPORT || errno == EAFNOSUPPORT))
+ errno == EPFNOSUPPORT || errno == EAFNOSUPPORT) ||
+ (getnetconfigent("udp6") == NULL && getnetconfigent("tcp6") == NULL))
ip6flag = 0;
else
close(s);
OpenPOWER on IntegriCloud