diff options
author | phk <phk@FreeBSD.org> | 1998-04-06 11:41:07 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-04-06 11:41:07 +0000 |
commit | fe94bc82888551c452b52083bbfe584035456bdc (patch) | |
tree | be9e7cbd8d6bb3c65456092184cb46be93897420 /sys/nfsclient | |
parent | 4b6dfe92bd78164a8094e9abc6d8947f2eb64c90 (diff) | |
download | FreeBSD-src-fe94bc82888551c452b52083bbfe584035456bdc.zip FreeBSD-src-fe94bc82888551c452b52083bbfe584035456bdc.tar.gz |
Use random() to find our initial xid.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_subs.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index b34c874..f9eabdd 100644 --- a/sys/nfsclient/nfs_subs.c +++ b/sys/nfsclient/nfs_subs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94 - * $Id: nfs_subs.c,v 1.51 1998/02/06 12:13:57 eivind Exp $ + * $Id: nfs_subs.c,v 1.52 1998/03/30 09:54:12 phk Exp $ */ /* @@ -642,7 +642,6 @@ nfsm_rpchead(cr, nmflag, procid, auth_type, auth_len, auth_str, verf_len, register int i; struct mbuf *mreq, *mb2; int siz, grpsiz, authsiz; - struct timeval tv; static u_long base; authsiz = nfsm_rndup(auth_len); @@ -663,15 +662,9 @@ nfsm_rpchead(cr, nmflag, procid, auth_type, auth_len, auth_str, verf_len, */ nfsm_build(tl, u_long *, 8 * NFSX_UNSIGNED); - /* - * derive initial xid from system time - * XXX time is invalid if root not yet mounted - */ - if (!base && (rootvp)) { - microtime(&tv); - base = tv.tv_sec << 12; - nfs_xid = base; - } + /* Get a pretty random xid to start with */ + if (!nfs_xid) + nfs_xid = random(); /* * Skip zero xid if it should ever happen. */ |