1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-26 08:55:18 +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.
This commit is contained in:
Yu Watanabe 2023-01-28 14:01:37 +09:00 committed by Luca Boccassi
parent c811aba082
commit b52031dbbc

View File

@ -390,7 +390,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;