summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-05-18 19:43:18 +0000
committeriedowse <iedowse@FreeBSD.org>2001-05-18 19:43:18 +0000
commit1ca07564dd4fb500feefd91a84c1df6e93e095ce (patch)
treeae731b343105707b2253da627b19ec25d6d835a7
parent52011546853a4017a1fa9778c7dd75ab0eab6bd6 (diff)
downloadFreeBSD-src-1ca07564dd4fb500feefd91a84c1df6e93e095ce.zip
FreeBSD-src-1ca07564dd4fb500feefd91a84c1df6e93e095ce.tar.gz
The function clnt_dg_call(), which is used for UDP RPC calls, could
accidentally clobber the server address if a stray packet arrived at the client port. This would result in any further retransmits going to the wrong address. For now, fix this by not saving the source address of the reply; this matches the pre-tirpc behaviour.
-rw-r--r--lib/libc/rpc/clnt_dg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c
index 089c79b..2ab6f4a 100644
--- a/lib/libc/rpc/clnt_dg.c
+++ b/lib/libc/rpc/clnt_dg.c
@@ -310,7 +310,7 @@ clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
int dtbsize = __rpc_dtbsize();
sigset_t mask;
sigset_t newmask;
- socklen_t fromlen, inlen;
+ socklen_t inlen;
ssize_t recvlen = 0;
int rpc_lock_value;
u_int32_t xid;
@@ -492,10 +492,8 @@ get_reply:
*/
errno = 0;
}
- fromlen = sizeof (struct sockaddr_storage);
recvlen = _recvfrom(cu->cu_fd, cu->cu_inbuf,
- cu->cu_recvsz, 0, (struct sockaddr *)(void *)&cu->cu_raddr,
- &fromlen);
+ cu->cu_recvsz, 0, NULL, NULL);
} while (recvlen < 0 && errno == EINTR);
if (recvlen < 0) {
if (errno == EWOULDBLOCK)
OpenPOWER on IntegriCloud