From: Roy Marples Date: Thu, 12 Apr 2007 06:52:51 +0000 (+0000) Subject: Redfine the variable and add a comment X-Git-Tag: v3.2.3~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=854f4d91ef12068f27b568113d02fc6211750be3;p=thirdparty%2Fdhcpcd.git Redfine the variable and add a comment --- diff --git a/dhcp.c b/dhcp.c index ae9b85df..6007def7 100644 --- 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 92ee7efd..7308f163 100644 --- 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 {