From fbd7623dd8d5e418e7cb369d4026d5368f7c46a6 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 5 Apr 2017 13:26:49 -0400 Subject: nfsd: don't enable a UDP socket by default Most major NFS clients have supported TCP for at least a decade now, and v4-only shops are becoming more prevalent. It seems reasonable that serving over UDP should be something that is "opt-in". I've always hesitated to do this in the past, but now that we have nfs.conf, it seems like the time may be right to disable UDP in default configurations. In particular, it would be good to try this in the more bleeding edge distros (Fedora, Ubuntu, SuSE, etc...) and see how problematic it is. Change the default in rpc.nfsd to just open TCP ports by default. Add new -u and -t options that allow users to explicitly override what's in the config file, and update the usage message and manpage. Signed-off-by: Jeff Layton Signed-off-by: Steve Dickson --- support/include/nfs/nfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'support/include') diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h index 5860343..7933ff5 100644 --- a/support/include/nfs/nfs.h +++ b/support/include/nfs/nfs.h @@ -27,6 +27,7 @@ struct nfs_fh_len { #define NFSCTL_UDPBIT (1 << (17 - 1)) #define NFSCTL_TCPBIT (1 << (18 - 1)) +#define NFSCTL_PROTODEFAULT (NFSCTL_TCPBIT) #define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << ((_v) - 1))) #define NFSCTL_MINORUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << (_v))) @@ -45,6 +46,5 @@ struct nfs_fh_len { #define NFSCTL_TCPSET(_cltbits) ((_cltbits) |= NFSCTL_TCPBIT) #define NFSCTL_ANYPROTO(_cltbits) ((_cltbits) & (NFSCTL_UDPBIT | NFSCTL_TCPBIT)) -#define NFSCTL_ALLBITS (~0) #endif /* _NFS_NFS_H */ -- cgit