chiark / gitweb /
sd-dhcp-client: fix max size of REQUEST message
authorTom Gundersen <teg@jklm.no>
Sun, 23 Feb 2014 21:09:23 +0000 (22:09 +0100)
committerTom Gundersen <teg@jklm.no>
Sun, 23 Feb 2014 22:00:18 +0000 (23:00 +0100)
src/libsystemd-dhcp/sd-dhcp-client.c

index 01397cf..ee6e89e 100644 (file)
@@ -303,7 +303,7 @@ static int client_send_request(sd_dhcp_client *client, uint16_t secs) {
         uint8_t *opt;
 
         optlen = DHCP_MIN_OPTIONS_SIZE;
-        len = DHCP_MESSAGE_SIZE + optlen;
+        len = sizeof(DHCPPacket) + optlen;
 
         request = malloc0(len);
         if (!request)