On Jan 4, 2010, at 8:34 PM, Dan McGee wrote:
A lot of people don't have anything below v3 enabled, so showmount is
completely unusable. Try v3 {tcp, udp} first; if they don't work,
fall back
to v1 {tcp, udp}; if those don't work then just fail as before.
I don't see any immediate problems with this.
It might be nice to add a command line option to select which
transport to use, but that's entirely optional.
Signed-off-by: Dan McGee <dpmcgee@xxxxxxxxx>
---
First (and quick) attempt at a patch here for showmount. Let me know
if you see
serious problems with it or the approach. It seemed relatively sane
to me and
fixed my problems after brief testing.
See a report like this for some proof this is an issue in the wild:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557954
Thanks,
-Dan
utils/showmount/showmount.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/utils/showmount/showmount.c b/utils/showmount/showmount.c
index 418e8b9..716c06d 100644
--- a/utils/showmount/showmount.c
+++ b/utils/showmount/showmount.c
@@ -96,6 +96,14 @@ static CLIENT *nfs_get_mount_client(const char
*hostname)
rpcprog_t program = nfs_getrpcbyname(MOUNTPROG, nfs_sm_pgmtbl);
CLIENT *client;
+ client = clnt_create(hostname, program, MOUNTVERS_NFSV3, "tcp");
+ if (client)
+ return client;
+
+ client = clnt_create(hostname, program, MOUNTVERS_NFSV3, "udp");
+ if (client)
+ return client;
+
client = clnt_create(hostname, program, MOUNTVERS, "tcp");
if (client)
return client;
--
1.6.6
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs"
in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html