Store RPC procnum consistently as an u_int32_t. This is as it should be,
and avoid possible server crashes due to bogus comparisons. Partly from BSDI.
This commit is contained in:
parent
3b7a1d3ab0
commit
ae69375a24
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs.h,v 1.13 1996/12/10 10:07:22 mycroft Exp $ */
|
||||
/* $NetBSD: nfs.h,v 1.14 1997/05/12 23:36:04 fvdl Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -47,7 +47,7 @@
|
||||
#define NFS_MAXIOVEC 34
|
||||
#define NFS_TICKINTVL 5 /* Desired time for a tick (msec) */
|
||||
#define NFS_HZ (hz / nfs_ticks) /* Ticks/sec */
|
||||
#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */
|
||||
#define NFS_TIMEO (3 * NFS_HZ) /* Default timeout = 3 seconds */
|
||||
#define NFS_MINTIMEO (1 * NFS_HZ) /* Min timeout to use */
|
||||
#define NFS_MAXTIMEO (60 * NFS_HZ) /* Max timeout to backoff to */
|
||||
#define NFS_MINIDEMTIMEO (5 * NFS_HZ) /* Min timeout for non-idempotent ops*/
|
||||
@ -269,7 +269,7 @@ struct nfsreq {
|
||||
int r_retry; /* max retransmission count */
|
||||
int r_rexmit; /* current retrans count */
|
||||
int r_timer; /* tick counter on reply */
|
||||
int r_procnum; /* NFS procedure number */
|
||||
u_int32_t r_procnum; /* NFS procedure number */
|
||||
int r_rtt; /* RTT for rpc */
|
||||
struct proc *r_procp; /* Proc that did I/O system call */
|
||||
};
|
||||
@ -414,7 +414,7 @@ struct nfsrv_descript {
|
||||
struct mbuf *nd_nam; /* and socket addr */
|
||||
struct mbuf *nd_nam2; /* return socket addr */
|
||||
caddr_t nd_dpos; /* Current dissect pos */
|
||||
int nd_procnum; /* RPC # */
|
||||
u_int32_t nd_procnum; /* RPC # */
|
||||
int nd_stable; /* storage type */
|
||||
int nd_flag; /* nd_flag */
|
||||
int nd_len; /* Length of this write */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfsrtt.h,v 1.4 1996/02/18 11:54:07 fvdl Exp $ */
|
||||
/* $NetBSD: nfsrtt.h,v 1.5 1997/05/12 23:36:08 fvdl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -59,15 +59,15 @@
|
||||
struct nfsrtt {
|
||||
int pos; /* Position in array for next entry */
|
||||
struct rttl {
|
||||
int proc; /* NFS procedure number */
|
||||
int rtt; /* Measured round trip time */
|
||||
int rto; /* Round Trip Timeout */
|
||||
int sent; /* # rpcs in progress */
|
||||
int cwnd; /* Send window */
|
||||
int srtt; /* Ave Round Trip Time */
|
||||
int sdrtt; /* Ave mean deviation of RTT */
|
||||
fsid_t fsid; /* Fsid for mount point */
|
||||
struct timeval tstamp; /* Timestamp of log entry */
|
||||
u_int32_t proc; /* NFS procedure number */
|
||||
int rtt; /* Measured round trip time */
|
||||
int rto; /* Round Trip Timeout */
|
||||
int sent; /* # rpcs in progress */
|
||||
int cwnd; /* Send window */
|
||||
int srtt; /* Ave Round Trip Time */
|
||||
int sdrtt; /* Ave mean deviation of RTT */
|
||||
fsid_t fsid; /* Fsid for mount point */
|
||||
struct timeval tstamp; /* Timestamp of log entry */
|
||||
} rttl[NFSRTTLOGSIZ];
|
||||
};
|
||||
|
||||
@ -95,8 +95,8 @@ struct nfsdrt {
|
||||
int pos; /* Position of next log entry */
|
||||
struct drt {
|
||||
int flag; /* Bits as defined above */
|
||||
int proc; /* NFS procedure number */
|
||||
u_int32_t ipadr; /* IP address of client */
|
||||
u_int32_t proc; /* NFS procedure number */
|
||||
u_int32_t ipadr; /* IP address of client */
|
||||
int resptime; /* Response time (usec) */
|
||||
struct timeval tstamp; /* Timestamp of log entry */
|
||||
} drt[NFSRTTLOGSIZ];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfsrvcache.h,v 1.10 1996/02/18 11:54:08 fvdl Exp $ */
|
||||
/* $NetBSD: nfsrvcache.h,v 1.11 1997/05/12 23:36:07 fvdl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -57,7 +57,7 @@ struct nfsrvcache {
|
||||
int ru_repstat; /* Reply status */
|
||||
} rc_un;
|
||||
union nethostaddr rc_haddr; /* Host address */
|
||||
u_int16_t rc_proc; /* rpc proc number */
|
||||
u_int32_t rc_proc; /* rpc proc number */
|
||||
u_char rc_state; /* Current state of request */
|
||||
u_char rc_flag; /* Flag bits */
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user