HomeFreeBSD

netlink: improve edge case when reading out truncated last nlmsg in nb

Description

netlink: improve edge case when reading out truncated last nlmsg in nb

When there is not enough space for one full message we return it truncated.
This enters special block of code that previously may leave empty buffer
with offset == datalen in the queue. Avoid that, as dealing later with
empty buffers causes more pain than just avoiding them. While here add
missing msgrcv increment.

Details

Provenance
glebiusAuthored on Jan 11 2024, 4:51 AM
Parents
rG26caf57e0b0c: tests/netlink: improve recently added netlink_socket:membership
Branches
Unknown
Tags
Unknown