summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/rpc/ChangeLog6
-rw-r--r--src/lib/rpc/svc_udp.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog
index 3d2245de6b..6aea5fe9ad 100644
--- a/src/lib/rpc/ChangeLog
+++ b/src/lib/rpc/ChangeLog
@@ -1,3 +1,9 @@
+Mon Feb 10 00:04:36 1997 Tom Yu <tlyu@mit.edu>
+
+ * svc_udp.c (svcudp_recv): Avoid coredumps under Solaris (and
+ possibly other systems) by passing in a non-NULL iovec to
+ recvmsg().
+
Thu Jan 16 19:02:22 1997 Tom Yu <tlyu@mit.edu>
* Makefile.in (all-prerecurse): Update to use double-colon rules.
diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c
index 142293facd..55b591092c 100644
--- a/src/lib/rpc/svc_udp.c
+++ b/src/lib/rpc/svc_udp.c
@@ -175,6 +175,7 @@ svcudp_recv(xprt, msg)
struct rpc_msg *msg;
{
struct msghdr dummy;
+ struct iovec dummy_iov[1];
register struct svcudp_data *su = su_data(xprt);
register XDR *xdrs = &(su->su_xdrs);
register int rlen;
@@ -183,6 +184,10 @@ svcudp_recv(xprt, msg)
again:
memset((char *) &dummy, 0, sizeof(dummy));
+ dummy_iov[0].iov_base = rpc_buffer(xprt);
+ dummy_iov[0].iov_len = (int) su->su_iosz;
+ dummy.msg_iov = dummy_iov;
+ dummy.msg_iovlen = 1;
dummy.msg_namelen = xprt->xp_laddrlen = sizeof(struct sockaddr_in);
dummy.msg_name = (char *) &xprt->xp_laddr;
rlen = recvmsg(xprt->xp_sock, &dummy, MSG_PEEK);