From 4d6067c1064b296043631d58aba286556442f060 Mon Sep 17 00:00:00 2001 From: Daniel Gryniewicz Date: Mon, 1 Apr 2019 13:27:25 -0400 Subject: [PATCH] NSM - Don't force UDP portmapper lookups On modern Linux, statd only listens on TCP. Forcing UDP for connections causes them to time out. Any system that claims to support TCP but doesn't is so out-of-date we probably have other issues there. Fix it so that TCP actually uses TCP. Signed-off-by: Daniel Gryniewicz --- src/rpcb_clnt.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c index aee8c704a5..9d613eacfe 100644 --- a/src/rpcb_clnt.c +++ b/src/rpcb_clnt.c @@ -679,21 +679,8 @@ __rpcb_findaddr_timed(rpcprog_t program, rpcvers_t version, rpcvers_t pmapvers = 2; uint16_t port = 0; - /* - * Try UDP only - there are some portmappers out - * there that use UDP only. - */ if (strcmp(nconf->nc_proto, NC_TCP) == 0) { - struct netconfig *newnconf; - - newnconf = getnetconfigent("udp"); - if (!newnconf) { - client = clnt_raw_ncreate(program, version); - client->cl_error.re_status = RPC_UNKNOWNPROTO; - goto error; - } - client = getclnthandle(host, newnconf, &parms.r_addr); - freenetconfigent(newnconf); + client = getclnthandle(host, nconf, &parms.r_addr); } else if (strcmp(nconf->nc_proto, NC_UDP) == 0) client = getclnthandle(host, nconf, &parms.r_addr); else