HomeFreeBSD

Relax rtsock message restrictions.

Description

Relax rtsock message restrictions.

Address multiple issues with strict rtsock message validation.

D28668 "normalisation" approach was based on the assumption that
we always have at least "standard" sockaddr len.
It turned out to be false - certain older applications like quagga
or routed abuse sin[6]_len field and set it to the offset to the
first fully-zero bit in the mask. It is impossible to normalise
such sockaddrs without reallocation.

With that in mind, change the approach to use a distinct memory
buffer for the altered sockaddrs. This allows supporting the older
software while maintaining the guarantee on the "standard" sockaddrs.

PR: 255273,255089
Differential Revision: https://reviews.freebsd.org/D29826
MFC after: 3 days

Details

Provenance
melifaroAuthored on Apr 19 2021, 8:49 PM
Differential Revision
D29826: Relax rtsock message restrictions
Parents
rG83223eb58bf7: Fixup ObsoleteFiles after 76681661be28.
Branches
Unknown
Tags
Unknown