]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Redfine the variable and add a comment
authorRoy Marples <roy@marples.name>
Thu, 12 Apr 2007 06:52:51 +0000 (06:52 +0000)
committerRoy Marples <roy@marples.name>
Thu, 12 Apr 2007 06:52:51 +0000 (06:52 +0000)
dhcp.c
dhcp.h

diff --git a/dhcp.c b/dhcp.c
index ae9b85dfc6d09146aa91730f8b2ac7fad0334f14..6007def7682cca2aa8141f7a96823fb1f405ea94 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -246,8 +246,10 @@ size_t send_message (const interface_t *iface, const dhcp_t *dhcp,
 
        *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
 
diff --git a/dhcp.h b/dhcp.h
index 92ee7efd5e7e22701d7cef9a29a7ab590193833f..7308f163a4740a2a37f6796e631eba3f579f881c 100644 (file)
--- a/dhcp.h
+++ b/dhcp.h
@@ -168,7 +168,7 @@ typedef struct dhcp_t
                                                                - 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
 {