HomeFreeBSD

netlink: fix compatibility with older netlink applications.

Description

netlink: fix compatibility with older netlink applications.

Some apps try to provide only the non-zero part of the required message
header instead of the full one. It happens when fetching routes or
interface addresses, where the first header byte is the family.
This behavior is "illegal" under the "strict" Netlink socket option,
however there are many applications out there doing things in the
"old" way.

Support this usecase by copying the provided bytes into the temporary
zero-filled header and running the parser on this header instead.

Reported by: Goran Mekić <meka@tilda.center>

Details

Provenance
melifaroAuthored on Jan 16 2023, 12:14 PM
Parents
rGa8633361ab71: netlink: fix typo in netlink(4)
Branches
Unknown
Tags
Unknown