From a80482157632584ee03df58ed1eef3cefd95bbcb Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 5 Nov 2013 14:10:05 -0500 Subject: 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 --- support/nfs/svc_create.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'support/nfs/svc_create.c') 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 #include #include +#include "nfslib.h" #include @@ -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 -- cgit