summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/dietlibc/librpc/pmap_getport.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdk-stage1/dietlibc/librpc/pmap_getport.c b/mdk-stage1/dietlibc/librpc/pmap_getport.c
index edf199e69..f26cb7621 100644
--- a/mdk-stage1/dietlibc/librpc/pmap_getport.c
+++ b/mdk-stage1/dietlibc/librpc/pmap_getport.c
@@ -67,8 +67,12 @@ unsigned int protocol;
struct pmap parms;
address->sin_port = htons((unsigned short)PMAPPORT);
- client = clntudp_bufcreate(address, PMAPPROG,
- PMAPVERS, timeout, &socket, RPCSMALLMSGSIZE,
+ if (protocol == IPPROTO_TCP)
+ client = clnttcp_create(address, PMAPPROG, PMAPVERS, &socket,
+ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
+ else
+ client = clntudp_bufcreate(address, PMAPPROG, PMAPVERS, timeout,
+ &socket, RPCSMALLMSGSIZE,
RPCSMALLMSGSIZE);
if (client != (CLIENT *) NULL) {
parms.pm_prog = program;