View | Details | Raw Unified | Return to bug 261291 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/fs/nfs/nfsrvstate.h (+1 lines)
Lines 116-121 struct nfsclient { Link Here
116
	struct nfssockreq lc_req;		/* Callback info */
116
	struct nfssockreq lc_req;		/* Callback info */
117
	u_int32_t	lc_flags;		/* LCL_ flag bits */
117
	u_int32_t	lc_flags;		/* LCL_ flag bits */
118
	u_char		lc_verf[NFSX_VERF];	 /* client verifier */
118
	u_char		lc_verf[NFSX_VERF];	 /* client verifier */
119
	bool		lc_is_vmware;		/* VMWare.com NFS client? */
119
	u_char		lc_id[1];		/* Malloc'd correct size */
120
	u_char		lc_id[1];		/* Malloc'd correct size */
120
};
121
};
121
122
(-)b/sys/fs/nfsserver/nfs_nfsdserv.c (+25 lines)
Lines 4362-4367 nfsrvd_exchangeid(struct nfsrv_descript *nd, __unused int isdgram, Link Here
4362
		goto nfsmout;
4362
		goto nfsmout;
4363
	}
4363
	}
4364
4364
4365
	/*
4366
	 * Check if the client implementation is VMWare ESX
4367
	 * XXX RFC 5661 section 18.35.3 explicitly tells us not to take any
4368
	 * action based on this, but we've got a bug to workaround.
4369
	 */
4370
	clp->lc_is_vmware = false;
4371
	tl = nfsm_dissect(nd, sizeof(uint32_t));
4372
	if (!tl)
4373
		goto no_implname;
4374
	uint32_t eia_client_impl_id = fxdr_unsigned(uint32_t, *tl);
4375
	if (eia_client_impl_id == 0)
4376
		goto no_implname;
4377
	tl = nfsm_dissect(nd, sizeof(uint32_t));
4378
	if (!tl)
4379
		goto no_implname;
4380
	uint32_t nii_domain_len = fxdr_unsigned(uint32_t, *tl);
4381
	if (nii_domain_len <= 0)
4382
		goto no_implname;
4383
	s = nfsm_dissect(nd, nii_domain_len * sizeof(char));
4384
	if (!s)
4385
		goto no_implname;
4386
	if (strncmp(s, "vmware.com", nii_domain_len) == 0)
4387
		clp->lc_is_vmware = true;
4388
4389
no_implname:
4365
	/*
4390
	/*
4366
	 * nfsrv_setclient() does the actual work of adding it to the
4391
	 * nfsrv_setclient() does the actual work of adding it to the
4367
	 * client list. If there is no error, the structure has been
4392
	 * client list. If there is no error, the structure has been
(-)b/sys/fs/nfsserver/nfs_nfsdstate.c (-2 / +7 lines)
Lines 115-120 SYSCTL_INT(_vfs_nfsd, OID_AUTO, flexlinuxhack, CTLFLAG_RW, Link Here
115
    &nfsrv_flexlinuxhack, 0,
115
    &nfsrv_flexlinuxhack, 0,
116
    "For Linux clients, hack around Flex File Layout bug");
116
    "For Linux clients, hack around Flex File Layout bug");
117
117
118
int	nfsrv_esx_seqid_hack = 0;
119
SYSCTL_INT(_vfs_nfsd, OID_AUTO, esx_seqid_hack, CTLFLAG_RW,
120
    &nfsrv_esx_seqid_hack, 0,
121
    "Disregard a CREATE_SESSION request's sequence id for VMWare ESXi clients.");
122
118
/*
123
/*
119
 * Hash lists for nfs V4.
124
 * Hash lists for nfs V4.
120
 */
125
 */
Lines 677-683 nfsrv_getclient(nfsquad_t clientid, int opflags, struct nfsclient **clpp, Link Here
677
	 */
682
	 */
678
	if (opflags & CLOPS_CONFIRM) {
683
	if (opflags & CLOPS_CONFIRM) {
679
		if ((nd->nd_flag & ND_NFSV41) != 0 &&
684
		if ((nd->nd_flag & ND_NFSV41) != 0 &&
680
		     clp->lc_confirm.lval[0] != confirm.lval[0])
685
		    (!(nfsrv_esx_seqid_hack && clp->lc_is_vmware) &&
686
		     (clp->lc_confirm.lval[0] != confirm.lval[0])))
681
			error = NFSERR_SEQMISORDERED;
687
			error = NFSERR_SEQMISORDERED;
682
		else if ((nd->nd_flag & ND_NFSV41) == 0 &&
688
		else if ((nd->nd_flag & ND_NFSV41) == 0 &&
683
		     clp->lc_confirm.qval != confirm.qval)
689
		     clp->lc_confirm.qval != confirm.qval)
684
- 

Return to bug 261291