aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/options.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-21 06:15:28 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-21 06:15:28 +0100
commitc7dc79e71ddbc1498736a2bbf65a3da179557f83 (patch)
treeab470e39f11f432b2099d3ebbe779d224bc1efba /networking/udhcp/options.c
parent2e7aa928360eb9b1c90fa2356734cee794b66516 (diff)
downloadbusybox-c7dc79e71ddbc1498736a2bbf65a3da179557f83.tar.gz
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 <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/options.c')
-rw-r--r--networking/udhcp/options.c2
1 files changed, 1 insertions, 1 deletions
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);