* [PATCH 1/2 V2] mount.nfs: Continue to trying address when the server return EACCES
@ 2012-11-27 17:01 Steve Dickson
2012-11-27 17:01 ` [PATCH 2/2 V2] mount.nfs: error message clean up Steve Dickson
2012-11-28 14:40 ` [PATCH 1/2 V2] mount.nfs: Continue to trying address when the server return EACCES Steve Dickson
0 siblings, 2 replies; 4+ messages in thread
From: Steve Dickson @ 2012-11-27 17:01 UTC (permalink / raw)
To: Linux NFS Mailing list
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 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index 9b4197b..8ee3024 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -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;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2 V2] mount.nfs: error message clean up.
2012-11-27 17:01 [PATCH 1/2 V2] mount.nfs: Continue to trying address when the server return EACCES Steve Dickson
@ 2012-11-27 17:01 ` Steve Dickson
2012-11-28 14:41 ` Steve Dickson
2012-11-28 14:40 ` [PATCH 1/2 V2] mount.nfs: Continue to trying address when the server return EACCES Steve Dickson
1 sibling, 1 reply; 4+ messages in thread
From: Steve Dickson @ 2012-11-27 17:01 UTC (permalink / raw)
To: Linux NFS Mailing list
Remove a unnecessary newline in an error message.
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/mount/error.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/mount/error.c b/utils/mount/error.c
index 83ad1d2..f8fc13f 100644
--- a/utils/mount/error.c
+++ b/utils/mount/error.c
@@ -225,7 +225,7 @@ void mount_error(const char *spec, const char *mount_point, int error)
case ENOENT:
if (spec)
nfs_error(_("%s: mounting %s failed, "
- "reason given by server:\n %s"),
+ "reason given by server: %s"),
progname, spec, strerror(error));
else
nfs_error(_("%s: mount point %s does not exist"),
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2 V2] mount.nfs: Continue to trying address when the server return EACCES
2012-11-27 17:01 [PATCH 1/2 V2] mount.nfs: Continue to trying address when the server return EACCES Steve Dickson
2012-11-27 17:01 ` [PATCH 2/2 V2] mount.nfs: error message clean up Steve Dickson
@ 2012-11-28 14:40 ` Steve Dickson
1 sibling, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2012-11-28 14:40 UTC (permalink / raw)
To: Steve Dickson; +Cc: Linux NFS Mailing list
On 27/11/12 12:01, Steve Dickson wrote:
> 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>
Committed...
steved.
> ---
> utils/mount/stropts.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index 9b4197b..8ee3024 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -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;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2 V2] mount.nfs: error message clean up.
2012-11-27 17:01 ` [PATCH 2/2 V2] mount.nfs: error message clean up Steve Dickson
@ 2012-11-28 14:41 ` Steve Dickson
0 siblings, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2012-11-28 14:41 UTC (permalink / raw)
To: Steve Dickson; +Cc: Linux NFS Mailing list
On 27/11/12 12:01, Steve Dickson wrote:
> Remove a unnecessary newline in an error message.
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
> utils/mount/error.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Committed....
steved.
> diff --git a/utils/mount/error.c b/utils/mount/error.c
> index 83ad1d2..f8fc13f 100644
> --- a/utils/mount/error.c
> +++ b/utils/mount/error.c
> @@ -225,7 +225,7 @@ void mount_error(const char *spec, const char *mount_point, int error)
> case ENOENT:
> if (spec)
> nfs_error(_("%s: mounting %s failed, "
> - "reason given by server:\n %s"),
> + "reason given by server: %s"),
> progname, spec, strerror(error));
> else
> nfs_error(_("%s: mount point %s does not exist"),
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-28 14:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 17:01 [PATCH 1/2 V2] mount.nfs: Continue to trying address when the server return EACCES Steve Dickson
2012-11-27 17:01 ` [PATCH 2/2 V2] mount.nfs: error message clean up Steve Dickson
2012-11-28 14:41 ` Steve Dickson
2012-11-28 14:40 ` [PATCH 1/2 V2] mount.nfs: Continue to trying address when the server return EACCES Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).