mount.nfs: don't use IPv6 unless IPV6_SUPPORTED is set

This commit is contained in:
Steve Dickson 2010-01-04 20:49:49 +00:00
parent 3bed751430
commit fadd6f5f22
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,30 @@
commit 6c3abd83758060356db4fa4e9d69d5bec09865e4
Author: Jeff Layton <jlayton@redhat.com>
Date: Mon Jan 4 15:42:51 2010 -0500
mount.nfs: don't use IPv6 unless IPV6_SUPPORTED is set
Commit 1f3fae1fb25168aac187ff1881738c8ad53a8763 made mount.nfs start
looking up and trying to use IPv6 addresses when mount.nfs was built
against libtirpc (even when --enable-ipv6 wasn't specified).
The problem seems to be that nfs_nfs_proto_family() is basing the family
on HAVE_LIBTIRPC. I think it should be basing it on IPV6_SUPPORTED
instead.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/mount/network.c b/utils/mount/network.c
index e3ad5c2..906e20c 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -1344,7 +1344,7 @@ int nfs_nfs_proto_family(struct mount_options *options,
unsigned long protocol;
char *option;
-#ifdef HAVE_LIBTIRPC
+#ifdef IPV6_SUPPORTED
*family = AF_UNSPEC;
#else
*family = AF_INET;

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils
URL: http://sourceforge.net/projects/nfs
Version: 1.2.1
Release: 7%{?dist}
Release: 8%{?dist}
Epoch: 1
# group all 32bit related archs
@ -23,6 +23,7 @@ Patch01: nfs-utils-1.1.0-smnotify-path.patch
Patch02: nfs-utils-1.1.0-exp-subtree-warn-off.patch
Patch100: nfs-utils-1.2.2-rc3.patch
Patch101: nfs-utils-1.2.1-mount-ipv6-typo.patch
Patch200: nfs-utils-1.2.0-v4root-rel9.patch
@ -77,6 +78,7 @@ This package also contains the mount.nfs and umount.nfs program.
%patch02 -p1
%patch100 -p1
%patch101 -p1
%patch200 -p1
@ -250,6 +252,9 @@ fi
%attr(4755,root,root) /sbin/umount.nfs4
%changelog
* Mon Jan 4 2010 Steve Dickson <steved@redhat.com> 1.2.1-8
- mount.nfs: don't use IPv6 unless IPV6_SUPPORTED is set
* Mon Dec 14 2009 Steve Dickson <steved@redhat.com> 1.2.1-7
- Updated to latest upstream RC release: nfs-utils-1-2-2-rc3