diff options
author | Steve Dickson <steved@redhat.com> | 2013-11-05 14:10:05 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2013-11-05 14:10:05 -0500 |
commit | a80482157632584ee03df58ed1eef3cefd95bbcb (patch) | |
tree | 17f9875fc50aceaa5468e7907f5c178e2c37845e /support/nfs/svc_create.c | |
parent | d4a408776d611cd62235232d65d488d02fca78e4 (diff) | |
download | nfs-utils-a80482157632584ee03df58ed1eef3cefd95bbcb.tar.gz nfs-utils-a80482157632584ee03df58ed1eef3cefd95bbcb.tar.xz nfs-utils-a80482157632584ee03df58ed1eef3cefd95bbcb.zip |
mountd: Use protocol bit fields to turn protocols off.
Convert the current code to used the NFSCTL_XXX macros
to turn off the TCP listener.
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/nfs/svc_create.c')
-rw-r--r-- | support/nfs/svc_create.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c index c159fc8..9ae2965 100644 --- a/support/nfs/svc_create.c +++ b/support/nfs/svc_create.c @@ -29,6 +29,7 @@ #include <unistd.h> #include <errno.h> #include <netdb.h> +#include "nfslib.h" #include <netinet/in.h> @@ -417,6 +418,10 @@ nfs_svc_create(char *name, const rpcprog_t program, const rpcvers_t version, if (!(nconf->nc_flag & NC_VISIBLE)) continue; visible++; + + if (!strcmp(nconf->nc_proto, NC_TCP) && !NFSCTL_TCPISSET(_rpcprotobits)) + continue; + if (port == 0) servport = getservport(program, nconf->nc_proto); else |