From c7dc79e71ddbc1498736a2bbf65a3da179557f83 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 21 Mar 2010 06:15:28 +0100 Subject: udhcpd: untangle incredibly messy handling of DHCPREQUEST Also fixes attacks possible via DHCPDECLINE / DHCPRELEASE function old new delta udhcpd_main 1846 1949 +103 send_renew 105 142 +37 send_NAK 61 - -61 send_ACK 180 - -180 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 2/0 up/down: 140/-241) Total: -101 bytes Signed-off-by: Denys Vlasenko --- networking/udhcp/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'networking/udhcp/options.c') diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c index 5bef985bc..29a264047 100644 --- a/networking/udhcp/options.c +++ b/networking/udhcp/options.c @@ -252,7 +252,7 @@ void FAST_FUNC add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data uint8_t option[6], len; option[OPT_CODE] = code; - len = dhcp_option_lengths[dh->flags & TYPE_MASK]; + len = dhcp_option_lengths[dh->flags & OPTION_TYPE_MASK]; option[OPT_LEN] = len; if (BB_BIG_ENDIAN) data <<= 8 * (4 - len); -- cgit v1.2.3