[PATCH 1/2] nfsd: disable v4.0 by default

Jeff Layton
2025-10-08T20:13:51Z

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
utils/nfsd/nfsd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index a405649976c25474c032a8dc63eca6b63b789278..365e145d8860f54a168613ac15f3f1345b794b30 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -134,9 +134,10 @@ main(int argc, char **argv)
}
}

- /* We assume the kernel will default all minor versions to 'on',
- * and allow the config file to disable some.
+ /* We assume the kernel will default all minor versions besides '0'
+ * to 'on', and allow the config file to disable some.
*/
+ NFSCTL_MINORUNSET(minorvers, 0);
for (i = NFS4_MINMINOR; i <= NFS4_MAXMINOR; i++) {
char tag[20];
sprintf(tag, "vers4.%d", i);

--
2.51.0