1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-21 09:33:57 +03:00

sd-dhcp-server: allow to send header only message

If we receive a header only message, and the server is running in relay
mode, then the assertion was triggered.

Fixes #26151.

(cherry picked from commit b52031dbbc)
(cherry picked from commit 7aeb2a8d4e)
(cherry picked from commit 41fdc8ed32)
This commit is contained in:
Yu Watanabe 2023-01-28 14:01:37 +09:00 committed by Luca Boccassi
parent b5ab57bd6f
commit 37d4bf1cd2

View File

@ -337,7 +337,7 @@ static int dhcp_server_send_udp(sd_dhcp_server *server, be32_t destination,
assert(server);
assert(server->fd >= 0);
assert(message);
assert(len > sizeof(DHCPMessage));
assert(len >= sizeof(DHCPMessage));
if (server->bind_to_interface) {
msg.msg_control = &control;