HomeFreeBSD

sockets: on accept(2) don't copy all of so_options to new socket

Description

sockets: on accept(2) don't copy all of so_options to new socket

As uncovered by e3ba0d6adde3 we are copying lots of irrelevant options
from the listener to an accepted socket, even those that aren't relevant
to a non-listener, e.g. SO_REUSE*, SO_ACCEPTFILTER. Stop doing that
and provide a fixed opt-in list for options to be inherited. Ideally
we shall not inherit anything at all. For compatibility inherit a set
of options that are meaningful for a non-listening socket of a protocol
that can listen(2).

Differential Revision: https://reviews.freebsd.org/D41412
Fixes: e3ba0d6adde3c694f46a30b3b67eba43a7099395

Details

Provenance
glebiusAuthored on Aug 14 2023, 7:56 PM
Differential Revision
D41412: sockets: on accept(2) don't copy all of so_options to new socket
Parents
rGe3637e2f5b80: RELNOTES: Trim spurious blank line.
Branches
Unknown
Tags
Unknown