udhcpd: untangle incredibly messy handling of DHCPREQUEST
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 21 Mar 2010 05:15:28 +0000 (06:15 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 21 Mar 2010 05:15:28 +0000 (06:15 +0100)
commitc7dc79e71ddbc1498736a2bbf65a3da179557f83
treeab470e39f11f432b2099d3ebbe779d224bc1efba
parent2e7aa928360eb9b1c90fa2356734cee794b66516
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>
networking/udhcp/clientpacket.c
networking/udhcp/common.h
networking/udhcp/dhcpc.h
networking/udhcp/dhcpd.c
networking/udhcp/files.c
networking/udhcp/options.c
networking/udhcp/options.h
networking/udhcp/packet.c
networking/udhcp/script.c