udhcp: pass pointer to whole packet to "add option" functions
This is needed for "overflow option" support function old new delta udhcp_find_option - 34 +34 udhcp_add_binary_option 94 106 +12 write_leases 227 223 -4 udhcp_init_header 86 82 -4 send_release 104 99 -5 init_packet 87 81 -6 add_client_options 160 154 -6 add_server_options 100 92 -8 udhcpd_main 1964 1954 -10 udhcpc_main 2859 2837 -22 find_option 34 - -34 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/8 up/down: 46/-99) Total: -53 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -33,7 +33,7 @@ void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type)
|
||||
packet->cookie = htonl(DHCP_MAGIC);
|
||||
if (DHCP_END != 0)
|
||||
packet->options[0] = DHCP_END;
|
||||
udhcp_add_simple_option(packet->options, DHCP_MESSAGE_TYPE, type);
|
||||
udhcp_add_simple_option(packet, DHCP_MESSAGE_TYPE, type);
|
||||
}
|
||||
|
||||
#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2
|
||||
|
Reference in New Issue
Block a user