if (err == ERPCMISMATCH || err == NQNFS_AUTHERR) {
if (err == ERPCMISMATCH || (err & NFSERR_AUTHERR)) {
nfs_rephead(siz, nd, err, cache, frev, mrq, mbp, bposp)	int siz;	struct nfsd *nd;	int err;	int cache;	u_quad_t *frev;	struct mbuf **mrq;	struct mbuf **mbp;	caddr_t *bposp;{	register u_int32_t *tl;	register struct mbuf *mreq;	caddr_t bpos;	struct mbuf *mb, *mb2;	MGETHDR(mreq, M_WAIT, MT_DATA);	mb = mreq;	/*	 * If this is a big reply, use a cluster else	 * try and leave leading space for the lower level headers.	 */	siz += RPC_REPLYSIZ;	if (siz >= MINCLSIZE) {		MCLGET(mreq, M_WAIT);	} else		mreq->m_data += max_hdr;	tl = mtod(mreq, u_int32_t *);	mreq->m_len = 6*NFSX_UNSIGNED;	bpos = ((caddr_t)tl)+mreq->m_len;	*tl++ = txdr_unsigned(nd->nd_retxid);	*tl++ = rpc_reply;	if (err == ERPCMISMATCH || err == NQNFS_AUTHERR) {		*tl++ = rpc_msgdenied;		if (err == NQNFS_AUTHERR) {			*tl++ = rpc_autherr;			*tl = rpc_rejectedcred;			mreq->m_len -= NFSX_UNSIGNED;			bpos -= NFSX_UNSIGNED;		} else {			*tl++ = rpc_mismatch;			*tl++ = txdr_unsigned(2);			*tl = txdr_unsigned(2);		}	} else {		*tl++ = rpc_msgaccepted;		*tl++ = 0;		*tl++ = 0;		switch (err) {		case EPROGUNAVAIL:			*tl = txdr_unsigned(RPC_PROGUNAVAIL);			break;		case EPROGMISMATCH:			*tl = txdr_unsigned(RPC_PROGMISMATCH);			nfsm_build(tl, u_int32_t *, 2*NFSX_UNSIGNED);			*tl++ = txdr_unsigned(2);			*tl = txdr_unsigned(2);	/* someday 3 */			break;		case EPROCUNAVAIL:			*tl = txdr_unsigned(RPC_PROCUNAVAIL);			break;		default:			*tl = 0;			if (err != VNOVAL) {				nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);				if (err)					*tl = txdr_unsigned(nfsrv_errmap[err - 1]);				else					*tl = 0;			}			break;		};	}	/*	 * For nqnfs, piggyback lease as requested.	 */	if (nd->nd_nqlflag != NQL_NOVAL && err == 0) {		if (nd->nd_nqlflag) {			nfsm_build(tl, u_int32_t *, 5*NFSX_UNSIGNED);			*tl++ = txdr_unsigned(nd->nd_nqlflag);			*tl++ = txdr_unsigned(cache);			*tl++ = txdr_unsigned(nd->nd_duration);			txdr_hyper(frev, tl);		} else {			if (nd->nd_nqlflag != 0)				panic("nqreph");			nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED);			*tl = 0;		}	}	*mrq = mreq;	*mbp = mb;	*bposp = bpos;	if (err != 0 && err != VNOVAL)		nfsstats.srvrpc_errs++;	return (0);}