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

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