Systemd/src/libsystemd
Lennart Poettering 9e45fb09bf netlink: port to recvmsg_safe()
This also makes sure the control buffer is properly aligned. This
matters, as otherwise the control buffer might not be aligned and the
cmsg buffer counting might be off. The incorrect alignment is becoming
visible by using recvmsg_safe() as we suddenly notice the MSG_CTRUNC bit
set because of this.

That said, apparently this isn't enough to make this work on all
kernels. Since I couldn't figure this out, we now add 1K to the buffer
to be sure. We do this once already, also for a pktinfo structure
(though an IPv4/IPv6) one. I am puzzled by this, but this shouldn't
matter much. it works locally just fine, except for those ubuntu CI
kernels...

While we are at it, make some other changes too, to simplify and
modernize the function.
2020-05-12 10:47:06 +02:00
..
sd-bus tree-wide: make sure our control buffers are properly aligned 2020-05-07 14:39:44 +02:00
sd-daemon Introduce sd_notify_barrier 2020-05-01 03:22:47 +05:30
sd-device Merge pull request #15623 from poettering/cmsg-cleanup 2020-05-08 11:05:06 +02:00
sd-event sd-event: use _cleanup_ in one more place 2020-01-08 17:15:54 +01:00
sd-hwdb hwdb: optimize isatty()-per-line away 2020-04-13 11:27:35 +02:00
sd-id128 id128: move make_v4_uuid into id128-util.h to make it generally useful 2020-01-20 17:42:03 +01:00
sd-login sd-login: get rid of seat_can_multi_session() 2020-04-17 16:15:30 +02:00
sd-netlink netlink: port to recvmsg_safe() 2020-05-12 10:47:06 +02:00
sd-network sd-network: Add support to retrive LPR servers 2020-04-22 14:49:52 +02:00
sd-path sd-path: export "systemd-network-path" 2020-03-27 20:12:45 +01:00
sd-resolve tree-wide: drop socket.h when socket-util.h is included 2019-11-04 00:30:32 +09:00
sd-utf8 tree-wide: drop empty comments 2018-06-29 11:00:30 +09:00
disable-mempool.c mempool: only enable mempool use when linked to libsystemd-shared.so 2018-10-11 11:10:37 +02:00
libsystemd.pc.in meson: define PROJECT_VERSION as the "bare" project version 2018-12-20 21:35:29 +01:00
libsystemd.sym sd-bus: add va_list variants of variadic convenience functions 2020-04-02 10:26:18 +02:00
meson.build sd-netlink: save dynamic general netlink message type 2019-10-15 01:57:19 +09:00