HomeFreeBSD

socket: Implement SO_RERROR

Description

socket: Implement SO_RERROR

SO_RERROR indicates that receive buffer overflows should be handled as
errors. Historically receive buffer overflows have been ignored and
programs could not tell if they missed messages or messages had been
truncated because of overflows. Since programs historically do not
expect to get receive overflow errors, this behavior is not the
default.

This is really really important for programs that use route(4) to keep
in sync with the system. If we loose a message then we need to reload
the full system state, otherwise the behaviour from that point is
undefined and can lead to chasing bogus bug reports.

Reviewed by: philip (network), kbowling (transport), gbe (manpages)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26652

(cherry picked from commit 7045b1603bdf054145dd958a4acc17b410fb62a0)

Details

Provenance
roy_marples.nameAuthored on Jul 28 2021, 3:46 PM
Kevin Bowling <kbowling@FreeBSD.org>Committed on Aug 11 2021, 1:59 AM
Reviewer
philip
Differential Revision
D26652: Implement SO_RERROR
Parents
R10:70a137b75e14: Do not expose to scheduler caches of single CPU.
Branches
Unknown
Tags
Unknown