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

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