HomeFreeBSD

nfsd: do not implicitly bind the back channel for NFSv4.1/4.2 mounts

Description

nfsd: do not implicitly bind the back channel for NFSv4.1/4.2 mounts

The NFSv4.1 (and 4.2 on 13) server incorrectly binds
a new TCP connection to the back channel when first
used by an RPC with a Sequence op in it (almost all of them).
RFC5661 specifies that only the fore channel should be bound.

This was done because early clients (including FreeBSD)
did not do the required BindConnectionToSession RPC.

Unfortunately, this breaks the Linux client when the
"nconnects" mount option is used, since the server
may do a callback on the incorrect TCP connection.

This patch converts the server behaviour to that
required by the RFC. It also makes the server test/indicate
failure of the back channel more aggressively.

Until this patch is applied to the server, the
"nconnects" mount option is not recommended for a Linux
NFSv4.1/4.2 client mount to the FreeBSD server.

PR: 254560
(cherry picked from commit 01ae8969a9eed652fbd894faa5b31b1593079ed8)

Details

Provenance
rmacklemAuthored on Mar 30 2021, 9:31 PM
Parents
rGe18f9de06121: nfsv4 client: fix forced dismount when sleeping in the renew thread
Branches
Unknown
Tags
Unknown