about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-14 19:50:21 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-14 19:50:21 +0000
commit086311a933ff53f8c064d833e69fe228bc7e8886 (patch)
treefbd7e1f94ea8eec257dd520f231c3d25505cbba2
parent2f279b14e76a0a8bef130645cf42786f14b02682 (diff)
downloadglibc-086311a933ff53f8c064d833e69fe228bc7e8886.tar.gz
glibc-086311a933ff53f8c064d833e69fe228bc7e8886.tar.xz
glibc-086311a933ff53f8c064d833e69fe228bc7e8886.zip
Update.
	* sunrpc/pm_getport.c (pmap_getport): Open TCP socket if protocol
	== IPPROTO_TCP.
	Patch by James Strandboge <jamie@tpptraining.com> [PR libc/4943].
-rw-r--r--ChangeLog4
-rw-r--r--sunrpc/pm_getport.c10
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 325c23dc2c..de780c255c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
 
+	* sunrpc/pm_getport.c (pmap_getport): Open TCP socket if protocol
+	== IPPROTO_TCP.
+	Patch by James Strandboge <jamie@tpptraining.com> [PR libc/4943].
+
 	* sysdeps/unix/sysv/linux/i386/dl-procinfo.c (_dl_x86_cap_flags):
 	Fix entry for bit 31.
 
diff --git a/sunrpc/pm_getport.c b/sunrpc/pm_getport.c
index a15f9785a5..00e1ba95bf 100644
--- a/sunrpc/pm_getport.c
+++ b/sunrpc/pm_getport.c
@@ -66,9 +66,13 @@ pmap_getport (address, program, version, protocol)
   struct pmap parms;
 
   address->sin_port = htons (PMAPPORT);
-  client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout,
-				      &socket, RPCSMALLMSGSIZE,
-				      RPCSMALLMSGSIZE);
+  if (protocol == IPPROTO_TCP)
+    client = INTUSE(clnttcp_create) (address, PMAPPROG, PMAPVERS, &socket,
+				     RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
+  else
+    client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout,
+					&socket, RPCSMALLMSGSIZE,
+					RPCSMALLMSGSIZE);
   if (client != (CLIENT *) NULL)
     {
       struct rpc_createerr *ce = &get_rpc_createerr ();