Index: dhcp.c =================================================================== --- dhcp.c (revision 188) +++ dhcp.c (working copy) @@ -38,6 +38,7 @@ #include "logger.h" #include "socket.h" +#define DHCP_PACKET_LENTH_MIN 300 #define BROADCAST_FLAG 0x8000 static const char *dhcp_message[] = { @@ -266,6 +267,11 @@ *p++ = DHCP_END; +#ifdef DHCP_PACKET_LENTH_MIN + while (p - m < DHCP_PACKET_LENTH_MIN) + *p++ = 0; +#endif + message_length = p - m; memset (&packet, 0, sizeof (struct udp_dhcp_packet));