]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mount.nfs: Continue to trying address when the server return EACCES
authorSteve Dickson <steved@redhat.com>
Wed, 28 Nov 2012 14:20:15 +0000 (09:20 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 28 Nov 2012 14:33:40 +0000 (09:33 -0500)
With recent changes to the /etc/hosts file, the 'localhost'
host name is now multiply defined as both an IPv4 address (127.0.01)
and an IPv6 address (::1). This causes first address returned
by getaddrinfo('localhost') to be the IPv6 address instead of
the IPv4 address.

The change in the default 'localhost' address type causes
existing exports using '127.0.0.1' to fail, because the
'::1' address is tried first and fails. The problem is
not all the addresses in the address list are being tried.

So this patch allows that address list to continue to be
process when a 'EACCES' error is returned by the server.

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/stropts.c

index 9b4197b7f93d812958da2b4eaffd73cba5600836..8ee3024164caa94a9bf84fc5d8aaea942e1ae026 100644 (file)
@@ -666,6 +666,7 @@ static int nfs_try_mount_v3v2(struct nfsmount_info *mi)
                case EOPNOTSUPP:
                case EHOSTUNREACH:
                case ETIMEDOUT:
+               case EACCES:
                        continue;
                default:
                        goto out;
@@ -761,6 +762,7 @@ static int nfs_try_mount_v4(struct nfsmount_info *mi)
                case ECONNREFUSED:
                case EHOSTUNREACH:
                case ETIMEDOUT:
+               case EACCES:
                        continue;
                default:
                        goto out;