X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fsvc_create.c;fp=support%2Fnfs%2Fsvc_create.c;h=c159fc8fbb9e0daa8679fc34a82ce19a1105deda;hp=b3f75edc2f9608577da0ea5734011d719c827bc5;hb=e1501725a9088533ce252e4cac789357db859d2e;hpb=e438055d752ef4f34712afc30ef61b67f43d7c90 diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c index b3f75ed..c159fc8 100644 --- a/support/nfs/svc_create.c +++ b/support/nfs/svc_create.c @@ -393,7 +393,7 @@ nfs_svc_create(char *name, const rpcprog_t program, const rpcvers_t version, const struct sigaction create_sigaction = { .sa_handler = SIG_IGN, }; - unsigned int visible, up; + unsigned int visible, up, servport; struct netconfig *nconf; void *handlep; @@ -417,8 +417,13 @@ nfs_svc_create(char *name, const rpcprog_t program, const rpcvers_t version, if (!(nconf->nc_flag & NC_VISIBLE)) continue; visible++; + if (port == 0) + servport = getservport(program, nconf->nc_proto); + else + servport = port; + up += svc_create_nconf(name, program, version, dispatch, - port, nconf); + servport, nconf); } if (visible == 0)