nfs-utils/nfs-utils-2.3.1-mount-auto-v3.patch
Petr Šabata 9e917f864c RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/nfs-utils#ae3700f20b5680274b29ff27c2f54879b44ab34b
2020-10-15 21:04:16 +02:00

33 lines
996 B
Diff

commit 5f32083c759b468f5b0cb9302e4fe2848d37cc5b
Author: Steve Dickson <steved@redhat.com>
Date: Tue Apr 10 10:25:40 2018 -0400
mount.nfs: Fix auto protocol negotiation
Commit 71b807e1 introduce a regression that
caused v3 not to be tried when v4 was not
supported by the server during auto negation.
A check of the type in nfs_nfs_version() was
reverted back to only check for the "nfs4"
string not the "nfs" string which fixed the
problem.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/mount/network.c b/utils/mount/network.c
index 9a2c878..e490399 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -1279,8 +1279,8 @@ nfs_nfs_version(char *type, struct mount_options *options, struct nfs_version *v
}
}
- if (!found && strncmp(type, "nfs", 3) == 0)
- version_val = "4";
+ if (!found && strcmp(type, "nfs4") == 0)
+ version_val = type + 3;
else if (!found)
return 1;
else if (i <= 2 ) {