Skip to content

Commit

Permalink
Merge pull request #169 from dang/push
Browse files Browse the repository at this point in the history
NSM - Don't force UDP portmapper lookups
  • Loading branch information
dang authored Apr 1, 2019
2 parents cb0cf40 + 4d6067c commit 52bb2d5
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52bb2d5

Please sign in to comment.