HomeFreeBSD

netlink: avoid putting empty mbufs on the socket queue

Description

netlink: avoid putting empty mbufs on the socket queue

When processing incoming Netlink messages in nl_process_nbuf() kernel
always allocates a writer with a buffer to put generated reply to.
However, certain messages aren't replied. That makes nlmsg_flush()
to put an empty buffer to the socket. Avoid doing that because avoiding
is much easier than dealing with empty buffers on the receiver side.

Details

Provenance
glebiusAuthored on Jan 11 2024, 4:51 AM
Parents
rGe6f4c3146065: netlink: improve edge case when reading out truncated last nlmsg in nb
Branches
Unknown
Tags
Unknown