autofs/autofs-5.1.7-also-require-TCP_REQUESTED-when-setting-NFS-port.patch

35 lines
1.0 KiB
Diff
Raw Normal View History

autofs-5.1.7 - also require TCP_REQUESTED when setting NFS port
From: Ian Kent <raven@themaw.net>
Set the NFS service port to the default (2049) only if tcp protocol is
being used and not alternate port has been given.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
modules/replicated.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--- autofs-5.1.7.orig/CHANGELOG
+++ autofs-5.1.7/CHANGELOG
@@ -98,6 +98,7 @@
- fix handling of incorrect return from umount_ent().
- make NFS version check flags consistent.
- refactor get_nfs_info().
+- also require TCP_REQUESTED when setting NFS port.
25/01/2021 autofs-5.1.7
- make bind mounts propagation slave by default.
--- autofs-5.1.7.orig/modules/replicated.c
+++ autofs-5.1.7/modules/replicated.c
@@ -291,7 +291,7 @@ static unsigned int get_nfs_info(unsigne
rpc_info->proto = proto;
if (port < 0) {
- if (version & NFS4_REQUESTED)
+ if ((version & NFS4_REQUESTED) && (version & TCP_REQUESTED))
rpc_info->port = NFS_PORT;
else
port = 0;