Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions core/src/main/java/org/dcache/nfs/v4/NFSv4StateHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,17 @@ public NFS4Client getClient(clientid4 clientid) throws StaleClientidException {
}

public NFS4Client getClientIdByStateId(stateid4 stateId) throws ChimeraNFSException {
if (Stateids.isStateLess(stateId)) {
// We do not support NFSv4.0 Anonymous/Bypass Stateids:
// https://datatracker.ietf.org/doc/html/rfc7530#section-9.1.4.3
//
// This is occasionally used by macOS NFS when it loses track of its state.
// Returning BAD_STATEID forces a connection-restart.
//
// https://github.com/apple-oss-distributions/NFS/blob/NFS-327.120.3/kext/nfs4_vnops.c#L2813
// https://github.com/apple-oss-distributions/NFS/blob/NFS-327.120.3/kext/nfs4_vnops.c#L1863L1880
throw new BadStateidException();
}

_readLock.lock();
try {
Expand Down