1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-31 14:50:15 +03:00

udev: assume that the recv buffer size of the netlink socket is already configured when the socket is passed in

This makes ReceiveBuffer= option in systemd-udevd-kernel.socket unit useful.
This commit is contained in:
Franck Bui 2020-01-28 16:22:12 +01:00 committed by Lennart Poettering
parent a05a6e8bba
commit 1ffadeaae3

View File

@ -1577,7 +1577,11 @@ static int manager_new(Manager **ret, int fd_ctrl, int fd_uevent, const char *cg
if (r < 0)
return log_error_errno(r, "Failed to initialize device monitor: %m");
(void) sd_device_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024);
/* Bump receiver buffer, but only if we are not called via socket activation, as in that
* case systemd sets the receive buffer size for us, and the value in the .socket unit
* should take full effect. */
if (fd_uevent < 0)
(void) sd_device_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024);
r = device_monitor_enable_receiving(manager->monitor);
if (r < 0)