From 37d4bf1cd29fe91dbb85b586c6a2a8b21bcffffe Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 28 Jan 2023 14:01:37 +0900 Subject: [PATCH] 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 b52031dbbcabe4b1e3016ba64d4a2822740188bc) (cherry picked from commit 7aeb2a8d4ea660ad863e7b2c5432f64f903f1cd5) (cherry picked from commit 41fdc8ed32408d598ddafc7feb3beece7f654262) --- src/libsystemd-network/sd-dhcp-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index 9088c09fc0..e258ffdef7 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -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;