summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2009-11-30 08:55:43 -0500
committerSteve Dickson <steved@redhat.com>2009-11-30 08:55:43 -0500
commitacb5c5d0201dfe3ff486c3a471c7d9e3b72cb3b5 (patch)
tree873d40572694f22c3fbf7596eb790e45f8b15aa7
parent4c3d6a16b6d1407846192f96d9fd1010c7c3f9a9 (diff)
downloadti-rpc-acb5c5d0201dfe3ff486c3a471c7d9e3b72cb3b5.tar.gz
rpcb_getaddr: Handle only "udp" and "tcp" netids when using PMAP_GETPORT
The PORTMAP logic in __rpcb_findaddr_timed() already prevents its use if the protocol family is not PF_INET. In addition, ensure that the rpcbind v2 logic in __rpcb_findaddr_timed() is executed only if the requested transport protocol name is "tcp" or "udp". Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--src/rpcb_clnt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
index e8a5d27..4a3e96c 100644
--- a/src/rpcb_clnt.c
+++ b/src/rpcb_clnt.c
@@ -759,9 +759,10 @@ __rpcb_findaddr_timed(program, version, nconf, host, clpp, tp)
}
client = getclnthandle(host, newnconf, &parms.r_addr);
freenetconfigent(newnconf);
- } else {
+ } else if (strcmp(nconf->nc_proto, NC_UDP) == 0)
client = getclnthandle(host, nconf, &parms.r_addr);
- }
+ else
+ goto try_rpcbind;
if (client == NULL)
return (NULL);