udhcp: we were forgetting to set right op byte in tha packet

for DHCPDECLINE. Fixing, and making code smaller.
This commit is contained in:
Denis Vlasenko 2008-02-20 22:33:38 +00:00
parent 84da0bf475
commit a523e2efad

View File

@ -18,13 +18,8 @@
void udhcp_init_header(struct dhcpMessage *packet, char type)
{
memset(packet, 0, sizeof(struct dhcpMessage));
packet->op = BOOTREQUEST;
switch (type) {
case DHCPDISCOVER:
case DHCPREQUEST:
case DHCPRELEASE:
case DHCPINFORM:
packet->op = BOOTREQUEST;
break;
case DHCPOFFER:
case DHCPACK:
case DHCPNAK: