]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netlink: improve nl_soreceive()
authorGleb Smirnoff <glebius@FreeBSD.org>
Tue, 2 Jan 2024 21:05:25 +0000 (13:05 -0800)
committerGleb Smirnoff <glebius@FreeBSD.org>
Tue, 2 Jan 2024 21:05:25 +0000 (13:05 -0800)
commit7e19c0186f001902efdc265139a9233b7a37eef1
treebd15b6c1dd4bd98c9318a06850c9e70cd336c4aa
parent17083b94a91563aba15ba03d1c74796a35bb1c26
netlink: improve nl_soreceive()

The previous commit conservatively mimiced operation of soreceive_generic().
The new code does two things:
- parses Netlink message headers and always returns at least one full nlmsg
- hides nl_buf boundaries from the userland, copying out several at once
More details can be found in the large comment block added.

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D42785
sys/netlink/netlink_domain.c