summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2015-08-14 22:02:14 +0000
committerrmacklem <rmacklem@FreeBSD.org>2015-08-14 22:02:14 +0000
commit6ee70894f043b42c41f8335e2106a951a38bd4ae (patch)
treec41a46740eecaee36cc213add5955b5fd4f1895f /sys/fs
parent675e2bd4e494cf94a70c02819c58bfe21ede1817 (diff)
downloadFreeBSD-src-6ee70894f043b42c41f8335e2106a951a38bd4ae.zip
FreeBSD-src-6ee70894f043b42c41f8335e2106a951a38bd4ae.tar.gz
For the case where an NFSv4.1 ExchangeID operation has the client identifier
that already has a confirmed ClientID, the nfsrv_setclient() function would not fill in the clientidp being returned. As such, the value of ClientID returned would be whatever garbage was on the stack. An NFSv4.1 client would not normally do this, but it appears that it can happen for certain Linux clients. When it happens, the client persistently retries the ExchangeID and Create_session after Create_session fails when it uses the bogus clientid. With this patch, the correct clientid is replied. This problem was identified in a packet trace supplied by Ahmed Kamal via email. Reported by: email.ahmedkamal@googlemail.com MFC after: 2 weeks
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdstate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
index d1ade4a..c0e05b9 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -401,9 +401,12 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp,
}
/* For NFSv4.1, mark that we found a confirmed clientid. */
- if ((nd->nd_flag & ND_NFSV41) != 0)
+ if ((nd->nd_flag & ND_NFSV41) != 0) {
+ clientidp->lval[0] = clp->lc_clientid.lval[0];
+ clientidp->lval[1] = clp->lc_clientid.lval[1];
+ confirmp->lval[0] = 0; /* Ignored by client */
confirmp->lval[1] = 1;
- else {
+ } else {
/*
* id and verifier match, so update the net address info
* and get rid of any existing callback authentication
OpenPOWER on IntegriCloud