changeset 92:77214d06ca2a draft

Redfine the variable and add a comment
author Roy Marples <roy@marples.name>
date Thu, 12 Apr 2007 06:52:51 +0000
parents bac1986b6e8f
children 0aee17c728c9
files dhcp.c dhcp.h
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dhcp.c	Wed Apr 11 19:44:37 2007 +0000
+++ b/dhcp.c	Thu Apr 12 06:52:51 2007 +0000
@@ -246,8 +246,10 @@
 
 	*p++ = DHCP_END;
 
-#ifdef DHCP_MESSAGE_LENTH_MIN
-	while (p - m < DHCP_MESSAGE_LENTH_MIN)
+#ifdef BOOTP_MESSAGE_LENTH_MIN
+	/* Some crappy DHCP servers think they have to obey the BOOTP minimum
+	 * messag length. They are wrong, but we should still cater for them */
+	while (p - m < BOOTP_MESSAGE_LENTH_MIN)
 		*p++ = DHCP_PAD;
 #endif
 
--- a/dhcp.h	Wed Apr 11 19:44:37 2007 +0000
+++ b/dhcp.h	Thu Apr 12 06:52:51 2007 +0000
@@ -168,7 +168,7 @@
 							 	- DHCP_RESERVE_LEN)
 
 /* Some crappy DHCP servers require the BOOTP minimum length */
-#define DHCP_MESSAGE_LENTH_MIN	300
+#define BOOTP_MESSAGE_LENTH_MIN	300
 
 typedef struct dhcpmessage_t
 {