]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netlink: improve edge case when reading out truncated last nlmsg in nb
authorGleb Smirnoff <glebius@FreeBSD.org>
Thu, 11 Jan 2024 04:51:53 +0000 (20:51 -0800)
committerGleb Smirnoff <glebius@FreeBSD.org>
Thu, 11 Jan 2024 04:51:53 +0000 (20:51 -0800)
commite6f4c31460658697827aed7f29ec6e960d6f0a87
treee7534d582581f988d0e395fd186ae5ec8eac0f7d
parent26caf57e0b0c02771b58ed99bc37b4810249d58e
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.
sys/netlink/netlink_domain.c