freebsd-nq/sys
Rick Macklem 9edaceca81 nfsd: cut the Linux NFSv4.1/4.2 some slack w.r.t. RFC5661
Recent testing of network partitioning a FreeBSD NFSv4.1
server from a Linux NFSv4.1 client identified problems
with both the FreeBSD server and Linux client.

Sometimes, after some Linux NFSv4.1/4.2 clients establish
a new TCP connection, they will advance the sequence number
for a session slot by 2 instead of 1.
RFC5661 specifies that a server should reply
NFS4ERR_SEQ_MISORDERED for this case.
This might result in a system call error in the client and
seems to disable future use of the slot by the client.
Since advancing the sequence number by 2 seems harmless,
allow this case if vfs.nfs.linuxseqsesshack is non-zero.

Note that, if the order of RPCs is actually reversed,
a subsequent RPC with a smaller sequence number value
for the slot will be received.  This will result in
a NFS4ERR_SEQ_MISORDERED reply.
This has not been observed during testing.
Setting vfs.nfs.linuxseqsesshack to 0 will provide
RFC5661 compliant behaviour.

This fix affects the fairly rare case where a NFSv4
Linux client does a TCP reconnect and then apparently
erroneously increments the sequence number for the
session slot twice during the reconnect cycle.

PR:	254816
MFC after:	2 weeks
2021-04-11 16:51:25 -07:00
..
amd64 Balance parentheses in sysctl descriptions 2021-04-11 10:30:55 +02:00
arm arm: add options GDB to std.armv6 and std.armv7 2021-03-30 12:04:24 -03:00
arm64 arm64: clear debug register state on fork 2021-04-08 09:41:41 -03:00
bsm
cam cam: make sure to clear even more CCBs allocated on the stack 2021-04-11 15:24:22 +01:00
cddl fbt: Remove some handling for multiple CTF containers 2021-04-02 17:49:13 -04:00
compat linuxkpi: remove erronously committed diff save file 2021-04-06 03:42:13 +03:00
conf pf: Introduce nvlist variant of DIOCADDRULE 2021-04-10 11:16:00 +02:00
contrib zfs: avoid memory allocation in arc_prune_async 2021-04-11 07:19:56 +02:00
crypto ossl: Don't encryt/decrypt too much data for chacha20. 2021-04-01 15:49:07 -07:00
ddb ddb: replace watchpoint set/clear functions 2021-03-29 12:05:44 -03:00
dev hv_kbd: Fix leaked $FreeBSD$ expansion 2021-04-12 02:16:22 +03:00
dts dts: Bump the freebsd branding version to 5.10 2021-03-23 15:02:21 +01:00
fs nfsd: cut the Linux NFSv4.1/4.2 some slack w.r.t. RFC5661 2021-04-11 16:51:25 -07:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gmirror: Pre-allocate the timeout event structure 2021-03-11 15:45:15 -05:00
gnu Remove the old dts imported tree. 2021-01-15 20:09:55 +01:00
i386 x86: use x86_clear_dbregs() on fork 2021-04-10 04:25:02 +03:00
isa Remove more remnants of sio(4) 2021-04-07 14:33:02 -04:00
kern ptrace: restructure comments around reparenting on PT_DETACH 2021-04-11 14:44:30 +03:00
kgssapi opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
libkern x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
mips nlmrsa: Remove this deprecated driver. 2021-04-09 16:10:31 -07:00
modules pf: Introduce nvlist variant of DIOCADDRULE 2021-04-10 11:16:00 +02:00
net Fix vlan creation for the older ifconfig(8) binaries. 2021-04-11 18:13:09 +01:00
net80211 net80211: prefix get_random_bytes() with net80211_ 2021-03-24 22:16:09 +00:00
netgraph netgraph/ng_bridge: Add counters for the first link, too 2021-02-10 19:05:37 +01:00
netinet Always use inp fib in the inp_lookup_mcast_ifp(). 2021-04-10 13:47:49 +00:00
netinet6 capsicum: Limit socket operations in capability mode 2021-04-07 14:32:56 -04:00
netipsec Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors." 2021-02-08 22:32:32 +00:00
netpfil pf: Move prototypes for userspace functions to userspace header 2021-04-10 11:16:02 +02:00
netsmb
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed LinuxKPI/OFED: (re)move inetdevice.h implementation 2021-03-30 14:40:46 +00:00
opencrypto Fix a typo in a comment: frame -> framework. 2021-04-09 16:10:55 -07:00
powerpc powerpc64: add missing TLB invalidations to radix 2021-04-06 08:31:44 -03:00
riscv ddb: replace watchpoint set/clear functions 2021-03-29 12:05:44 -03:00
rpc nfsv4 client: do the BindConnectionToSession as required 2021-04-11 14:34:57 -07:00
security Add a comment on why the call to mac_vnode_relabel() might be in the wrong 2021-02-27 16:25:26 +00:00
sys param.h: bump __FreeBSD_version for commit 7763814fc9 2021-04-11 14:50:56 -07:00
teken
tests Add IPv4 fib lookup performance tests with uniform keys. 2021-03-30 14:32:28 +01:00
tools syscalls.master: Add a new syscall type: RESERVED 2021-01-26 18:27:44 +00:00
ufs softdep_unmount: assert that no dandling dependencies are left 2021-03-12 13:31:08 +02:00
vm vm_fault: Shoot down multiply mapped COW source page mappings 2021-04-06 14:49:28 -04:00
x86 Balance parentheses in sysctl descriptions 2021-04-11 10:30:55 +02:00
xdr
xen xen: move x86-specific xen_vector_callback_enabled to sys/x86 2021-03-15 14:20:21 +01:00
Makefile