diff options
author | Denys Vlasenko | 2010-03-21 06:15:28 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-03-21 06:15:28 +0100 |
commit | c7dc79e71ddbc1498736a2bbf65a3da179557f83 (patch) | |
tree | ab470e39f11f432b2099d3ebbe779d224bc1efba /networking/udhcp/script.c | |
parent | 2e7aa928360eb9b1c90fa2356734cee794b66516 (diff) | |
download | busybox-c7dc79e71ddbc1498736a2bbf65a3da179557f83.zip busybox-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/script.c')
-rw-r--r-- | networking/udhcp/script.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c index b4413fa..400fd2b 100644 --- a/networking/udhcp/script.c +++ b/networking/udhcp/script.c @@ -64,7 +64,7 @@ static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_ /* option points to OPT_DATA, need to go back and get OPT_LEN */ len = option[OPT_LEN - OPT_DATA]; - type = type_p->flags & TYPE_MASK; + type = type_p->flags & OPTION_TYPE_MASK; optlen = dhcp_option_lengths[type]; upper_length = len_of_option_as_string[type] * (len / optlen); |