]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netlink: avoid putting empty mbufs on the socket queue
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)
commitf75d7fac109bf8e322b07456c5361ee62f5635c2
tree043e1350bdb7db020afaeb5b0029ff6c695226d6
parente6f4c31460658697827aed7f29ec6e960d6f0a87
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.
sys/netlink/netlink_domain.c
sys/netlink/netlink_io.c
sys/netlink/netlink_message_writer.c