summaryrefslogtreecommitdiffstats
path: root/sys/nfs4client/nfs4_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/nfs4client/nfs4_vfsops.c')
-rw-r--r--sys/nfs4client/nfs4_vfsops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfs4client/nfs4_vfsops.c b/sys/nfs4client/nfs4_vfsops.c
index 550a31a..ba03cc8 100644
--- a/sys/nfs4client/nfs4_vfsops.c
+++ b/sys/nfs4client/nfs4_vfsops.c
@@ -770,7 +770,7 @@ nfs4_do_setclientid(struct nfsmount *nmp, struct ucred *cred)
struct route ro;
char *ipsrc = NULL, uaddr[24], name[24];
int try = 0;
- static int seq;
+ static unsigned long seq;
int error;
#ifndef NFS4_USE_RPCCLNT
@@ -784,7 +784,7 @@ nfs4_do_setclientid(struct nfsmount *nmp, struct ucred *cred)
/* Try not to re-use clientids */
if (seq == 0)
- seq = time_second & 0xffffff;
+ seq = time_second;
#ifdef NFS4_USE_RPCCLNT
scid.cb_netid = (nmp->nm_rpcclnt.rc_sotype == SOCK_STREAM) ? "tcp" : "udp";
@@ -811,7 +811,7 @@ nfs4_do_setclientid(struct nfsmount *nmp, struct ucred *cred)
RTFREE(ro.ro_rt);
try_again:
- sprintf(name, "%s-%d", ipsrc, seq++);
+ sprintf(name, "%s-%d", ipsrc, (int) ((seq + try) % 1000000L));
scid.namelen = strlen(name);
scid.name = name;
nfs_v4initcompound(&cp);
OpenPOWER on IntegriCloud