From 090ca0002ff8ee4ca425bc6088cc097f46c67626 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Nov 1998 11:05:09 +0000 Subject: Update. 1998-11-18 Ulrich Drepper * io/Makefile (CFLAGS-ftw.c): Removed. 1998-11-18 Andreas Schwab * io/Makefile (tests): Make sure that the test program has an explicit directory part. 1998-11-18 Andreas Schwab * configure.in: Fix last change. 1998-11-18 Thorsten Kukuk * sunrpc/Makefile (routines): Add create_xid. * sunrpc/clnt_tcp.c: Use non-guessable xid. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/pmap_rmt.c: Likewise. * sunrpc/create_xid.c: New, create non-guessable xid. * sunrpc/svc_tcp.c: Remove patch from 1998-06-15, use poll instead of select. * sunrpc/svc_unix.c: Use poll instead of select. --- sunrpc/clnt_udp.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'sunrpc/clnt_udp.c') diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 0842e5a..ec63f60 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; #include extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *); +extern u_long _create_xid (void); /* * UDP bases client side rpc operations @@ -109,18 +110,12 @@ struct cu_data * sent and received. */ CLIENT * -clntudp_bufcreate (raddr, program, version, wait, sockp, sendsz, recvsz) - struct sockaddr_in *raddr; - u_long program; - u_long version; - struct timeval wait; - int *sockp; - u_int sendsz; - u_int recvsz; +clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, + struct timeval wait, int *sockp, u_int sendsz, + u_int recvsz) { CLIENT *cl; struct cu_data *cu = NULL; - struct timeval now; struct rpc_msg call_msg; cl = (CLIENT *) mem_alloc (sizeof (CLIENT)); @@ -143,7 +138,6 @@ clntudp_bufcreate (raddr, program, version, wait, sockp, sendsz, recvsz) } cu->cu_outbuf = &cu->cu_inbuf[recvsz]; - (void) __gettimeofday (&now, (struct timezone *) 0); if (raddr->sin_port == 0) { u_short port; @@ -163,7 +157,7 @@ clntudp_bufcreate (raddr, program, version, wait, sockp, sendsz, recvsz) cu->cu_total.tv_usec = -1; cu->cu_sendsz = sendsz; cu->cu_recvsz = recvsz; - call_msg.rm_xid = __getpid () ^ now.tv_sec ^ now.tv_usec; + call_msg.rm_xid = _create_xid (); call_msg.rm_direction = CALL; call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = program; -- cgit v1.1