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

Collapse All | Expand All

(-)sys/fs/nfsserver/nfs_nfsdstate.c (-29 / +4 lines)
Lines 6209-6215 nfsrv_checksequence(struct nfsrv_descript *nd, uint32_ Link Here
6209
	struct nfsdsession *sep;
6209
	struct nfsdsession *sep;
6210
	struct nfssessionhash *shp;
6210
	struct nfssessionhash *shp;
6211
	int error;
6211
	int error;
6212
	SVCXPRT *savxprt;
6213
6212
6214
	shp = NFSSESSIONHASH(nd->nd_sessionid);
6213
	shp = NFSSESSIONHASH(nd->nd_sessionid);
6215
	NFSLOCKSESSION(shp);
6214
	NFSLOCKSESSION(shp);
Lines 6235-6270 nfsrv_checksequence(struct nfsrv_descript *nd, uint32_ Link Here
6235
	nd->nd_maxreq = sep->sess_maxreq;
6234
	nd->nd_maxreq = sep->sess_maxreq;
6236
	nd->nd_maxresp = sep->sess_maxresp;
6235
	nd->nd_maxresp = sep->sess_maxresp;
6237
6236
6238
	/*
6239
	 * If this session handles the backchannel, save the nd_xprt for this
6240
	 * RPC, since this is the one being used.
6241
	 * RFC-5661 specifies that the fore channel will be implicitly
6242
	 * bound by a Sequence operation.  However, since some NFSv4.1 clients
6243
	 * erroneously assumed that the back channel would be implicitly
6244
	 * bound as well, do the implicit binding unless a
6245
	 * BindConnectiontoSession has already been done on the session.
6246
	 */
6247
	savxprt = NULL;
6248
	if (sep->sess_clp->lc_req.nr_client != NULL &&
6249
	    sep->sess_cbsess.nfsess_xprt != nd->nd_xprt &&
6250
	    (sep->sess_crflags & NFSV4CRSESS_CONNBACKCHAN) != 0 &&
6251
	    (sep->sess_clp->lc_flags & LCL_DONEBINDCONN) == 0) {
6252
		NFSD_DEBUG(2,
6253
		    "nfsrv_checksequence: implicit back channel bind\n");
6254
		savxprt = sep->sess_cbsess.nfsess_xprt;
6255
		SVC_ACQUIRE(nd->nd_xprt);
6256
		nd->nd_xprt->xp_p2 =
6257
		    sep->sess_clp->lc_req.nr_client->cl_private;
6258
		nd->nd_xprt->xp_idletimeout = 0;	/* Disable timeout. */
6259
		sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
6260
	}
6261
6262
	*sflagsp = 0;
6237
	*sflagsp = 0;
6263
	if (sep->sess_clp->lc_req.nr_client == NULL)
6238
	if (sep->sess_clp->lc_req.nr_client == NULL ||
6239
	    (sep->sess_clp->lc_flags & LCL_CBDOWN) != 0)
6264
		*sflagsp |= NFSV4SEQ_CBPATHDOWN;
6240
		*sflagsp |= NFSV4SEQ_CBPATHDOWN;
6265
	NFSUNLOCKSESSION(shp);
6241
	NFSUNLOCKSESSION(shp);
6266
	if (savxprt != NULL)
6267
		SVC_RELEASE(savxprt);
6268
	if (error == NFSERR_EXPIRED) {
6242
	if (error == NFSERR_EXPIRED) {
6269
		*sflagsp |= NFSV4SEQ_EXPIREDALLSTATEREVOKED;
6243
		*sflagsp |= NFSV4SEQ_EXPIREDALLSTATEREVOKED;
6270
		error = 0;
6244
		error = 0;
Lines 6464-6470 nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t Link Here
6464
				nd->nd_xprt->xp_idletimeout = 0;
6438
				nd->nd_xprt->xp_idletimeout = 0;
6465
				sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
6439
				sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
6466
				sep->sess_crflags |= NFSV4CRSESS_CONNBACKCHAN;
6440
				sep->sess_crflags |= NFSV4CRSESS_CONNBACKCHAN;
6467
				clp->lc_flags |= LCL_DONEBINDCONN;
6441
				clp->lc_flags |= LCL_DONEBINDCONN |
6442
				    LCL_NEEDSCBNULL;
6468
				if (*foreaftp == NFSCDFS4_BACK)
6443
				if (*foreaftp == NFSCDFS4_BACK)
6469
					*foreaftp = NFSCDFS4_BACK;
6444
					*foreaftp = NFSCDFS4_BACK;
6470
				else
6445
				else

Return to bug 254560