aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2021-10-08 15:04:44 +0800
committerIan Kent <raven@themaw.net>2021-10-13 12:15:54 +0800
commit606795ecfaa1ba45ab58fa20376213f6089e42e9 (patch)
tree39f1a12c5a42641bc0cc74a9a81972b38f6f1bb9
parent26fb6b5408be0e7966fec356f302e494039f0b6a (diff)
downloadautofs-606795ecfaa1ba45ab58fa20376213f6089e42e9.tar.gz
autofs-5.1.7 - also require TCP_REQUESTED when setting NFS port
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>
-rw-r--r--CHANGELOG1
-rw-r--r--modules/replicated.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5d2c2c88..fd5b800a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -91,6 +91,7 @@
- add buffer length checks to autofs mount_mount().
- 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.
diff --git a/modules/replicated.c b/modules/replicated.c
index e03c9d25..09075dd0 100644
--- a/modules/replicated.c
+++ b/modules/replicated.c
@@ -291,7 +291,7 @@ static unsigned int get_nfs_info(unsigned logopt, struct host *host,
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;