mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
nfscl: Return appropriate reply status for NFSv4.1 callbacks
Certain NFSv4.1 callbacks are not currently supported/used by the FreeBSD client. Without this patch, NFS4ERR_NOTSUPP is replied for the callbacks. Since NFSv4.1 does not specify all of these callbacks as optional, I think it is preferable to reply NFS_OK or NFS4ERR_REJECT_DELEG instead of NFS4ERR_NOTSUPP. This patch changes the reply status for these unsupported callbacks, which the client has no use for. I am not aware of any NFSv4.1 servers that will perform any of these callbacks against the FreeBSD client at this time. MFC after: 2 weeks
This commit is contained in:
parent
05dfaadde4
commit
56c8c19046
1 changed files with 19 additions and 0 deletions
|
|
@ -3989,6 +3989,25 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p)
|
|||
NFSUNLOCKCLSTATE();
|
||||
}
|
||||
break;
|
||||
case NFSV4OP_CBNOTIFY:
|
||||
case NFSV4OP_CBRECALLOBJAVAIL:
|
||||
case NFSV4OP_CBNOTIFYLOCK:
|
||||
/*
|
||||
* These callbacks are not necessarily optional,
|
||||
* so I think it is better to reply NFS_OK than
|
||||
* NFSERR_NOTSUPP.
|
||||
* All provide information for which the FreeBSD client
|
||||
* does not currently have a use.
|
||||
* I am not sure if any of these could be generated
|
||||
* by a NFSv4.1/4.2 server for this client?
|
||||
*/
|
||||
error = 0;
|
||||
NFSCL_DEBUG(1, "unsupp callback %d\n", op);
|
||||
break;
|
||||
case NFSV4OP_CBPUSHDELEG:
|
||||
error = NFSERR_REJECTDELEG;
|
||||
NFSCL_DEBUG(1, "unsupp callback %d\n", op);
|
||||
break;
|
||||
default:
|
||||
if (i == 0 && minorvers != NFSV4_MINORVERSION)
|
||||
error = NFSERR_OPNOTINSESS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue