summaryrefslogtreecommitdiff
path: root/lib/libc/rpc/clnt_tcp.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-02 05:01:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-02 05:01:15 +0000
commit4450ff856eeeb4173ac0cd0a9d536a01d26a10c9 (patch)
tree62a4c1950ee0973acb32028591d6e35cd20589a3 /lib/libc/rpc/clnt_tcp.c
parent53bd0292678195cfdf8e4d2ec1ccf87eb38cb57f (diff)
perturb xid further. confuse the world
Diffstat (limited to 'lib/libc/rpc/clnt_tcp.c')
-rw-r--r--lib/libc/rpc/clnt_tcp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/rpc/clnt_tcp.c b/lib/libc/rpc/clnt_tcp.c
index e8c65ecabf0..a67673edd0e 100644
--- a/lib/libc/rpc/clnt_tcp.c
+++ b/lib/libc/rpc/clnt_tcp.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.7 1996/08/20 23:47:37 deraadt Exp $";
+static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.8 1996/09/02 05:01:09 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -119,6 +119,10 @@ clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
register struct ct_data *ct;
struct timeval now;
struct rpc_msg call_msg;
+ static u_int32_t disrupt;
+
+ if (disrupt == 0)
+ disrupt = (u_int32_t)raddr;
h = (CLIENT *)mem_alloc(sizeof(*h));
if (h == NULL) {
@@ -179,7 +183,7 @@ clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
* Initialize call message
*/
(void)gettimeofday(&now, (struct timezone *)0);
- call_msg.rm_xid = getpid() ^ now.tv_sec ^ now.tv_usec;
+ call_msg.rm_xid = (++disrupt) ^ getpid() ^ now.tv_sec ^ now.tv_usec;
call_msg.rm_direction = CALL;
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
call_msg.rm_call.cb_prog = prog;