FreeBSD Bugzilla – Attachment 231733 Details for
Bug 261291
ESX NFS4.1 client hangs, server never responds to EXCHANGE_ID/CREATE_SESSION
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
admin revoke client when create_session seqid not equal exchange_id's
confirm2.patch (text/plain), 1.85 KB, created by
Rick Macklem
on 2022-02-10 23:10:47 UTC
(
hide
)
Description:
admin revoke client when create_session seqid not equal exchange_id's
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2022-02-10 23:10:47 UTC
Size:
1.85 KB
patch
obsolete
>--- sys/fs/nfsserver/nfs_nfsdstate.c.confirm2 2022-02-10 14:44:26.232510000 -0800 >+++ sys/fs/nfsserver/nfs_nfsdstate.c 2022-02-10 14:56:58.167442000 -0800 >@@ -133,6 +133,7 @@ static volatile int nfsrv_writedelegcnt = 0; > static int nfsrv_faildscnt; > > /* local functions */ >+static void nfsrv_revoke(struct nfsclient *clp, NFSPROC_T *p); > static void nfsrv_dumpaclient(struct nfsclient *clp, > struct nfsd_dumpclients *dumpp); > static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, >@@ -677,9 +678,10 @@ nfsrv_getclient(nfsquad_t clientid, int opflags, struc > */ > if (opflags & CLOPS_CONFIRM) { > if ((nd->nd_flag & ND_NFSV41) != 0 && >- clp->lc_confirm.lval[0] != confirm.lval[0]) >- error = NFSERR_SEQMISORDERED; >- else if ((nd->nd_flag & ND_NFSV41) == 0 && >+ clp->lc_confirm.lval[0] != confirm.lval[0]) { >+ nfsrv_revoke(clp, p); >+ error = NFSERR_ADMINREVOKED; >+ } else if ((nd->nd_flag & ND_NFSV41) == 0 && > clp->lc_confirm.qval != confirm.qval) > error = NFSERR_STALECLIENTID; > else if (nfsrv_notsamecredname(nd, clp)) >@@ -908,6 +910,25 @@ nfsrv_adminrevoke(struct nfsd_clid *revokep, NFSPROC_T > goto out; > } > >+ nfsrv_revoke(clp, p); >+ >+ NFSLOCKV4ROOTMUTEX(); >+ nfsv4_unlock(&nfsv4rootfs_lock, 0); >+ NFSUNLOCKV4ROOTMUTEX(); >+ >+out: >+ NFSEXITCODE(error); >+ return (error); >+} >+ >+/* >+ * Do the actual revokation of the client. The exclusive lock on >+ * nfsv4rootfs_lock must be held. >+ */ >+static void >+nfsrv_revoke(struct nfsclient *clp, NFSPROC_T *p) >+{ >+ > /* > * Now, write out the revocation record > */ >@@ -922,13 +943,6 @@ nfsrv_adminrevoke(struct nfsd_clid *revokep, NFSPROC_T > nfsrv_cleanclient(clp, p); > nfsrv_freedeleglist(&clp->lc_deleg); > nfsrv_freedeleglist(&clp->lc_olddeleg); >- NFSLOCKV4ROOTMUTEX(); >- nfsv4_unlock(&nfsv4rootfs_lock, 0); >- NFSUNLOCKV4ROOTMUTEX(); >- >-out: >- NFSEXITCODE(error); >- return (error); > } > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261291
:
231662
| 231733 |
231735