From 22e098af0f5d822650b30be471e8cd53a6c9103e Mon Sep 17 00:00:00 2001 From: yamt Date: Fri, 28 Sep 2001 08:45:41 +0000 Subject: [PATCH] check pmap_flag before sendto. --- lib/libc/rpc/clnt_bcast.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/rpc/clnt_bcast.c b/lib/libc/rpc/clnt_bcast.c index 09874788021f..6f93a2f8abe8 100644 --- a/lib/libc/rpc/clnt_bcast.c +++ b/lib/libc/rpc/clnt_bcast.c @@ -1,4 +1,4 @@ -/* $NetBSD: clnt_bcast.c,v 1.5 2001/05/08 23:21:17 lukem Exp $ */ +/* $NetBSD: clnt_bcast.c,v 1.6 2001/09/28 08:45:41 yamt Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -282,13 +282,14 @@ rpc_broadcast_exp(prog, vers, proc, xargs, argsp, xresults, resultsp, size_t fdlistno = 0; struct r_rpcb_rmtcallargs barg; /* Remote arguments */ struct r_rpcb_rmtcallres bres; /* Remote results */ - size_t outlen, outlen_pmap; + size_t outlen; struct netconfig *nconf; int msec; int pollretval; int fds_found; #ifdef PORTMAP + size_t outlen_pmap; u_long port; /* Remote port number */ int pmap_flag = 0; /* UDP exists ? */ char *outbuf_pmap = NULL; @@ -485,7 +486,7 @@ rpc_broadcast_exp(prog, vers, proc, xargs, argsp, xresults, resultsp, * Send the version 2 packet also * for UDP/IP */ - if (fdlist[i].proto == IPPROTO_UDP) { + if (pmap_flag && fdlist[i].proto == IPPROTO_UDP) { if (sendto(fdlist[i].fd, outbuf_pmap, outlen_pmap, 0, addr, (size_t)fdlist[i].asize) !=