summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/nfsd/nfsd.c3
-rw-r--r--usr.sbin/nfsd/nfsd.c3
2 files changed, 4 insertions, 2 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);
diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c
index 959f0fb..d8d4e04 100644
--- a/usr.sbin/nfsd/nfsd.c
+++ b/usr.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