mirror of
https://github.com/sheumann/hush.git
synced 2024-12-26 10:32:02 +00:00
udhcp: we were forgetting to set right op byte in tha packet
for DHCPDECLINE. Fixing, and making code smaller.
This commit is contained in:
parent
84da0bf475
commit
a523e2efad
@ -18,13 +18,8 @@
|
|||||||
void udhcp_init_header(struct dhcpMessage *packet, char type)
|
void udhcp_init_header(struct dhcpMessage *packet, char type)
|
||||||
{
|
{
|
||||||
memset(packet, 0, sizeof(struct dhcpMessage));
|
memset(packet, 0, sizeof(struct dhcpMessage));
|
||||||
|
packet->op = BOOTREQUEST;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DHCPDISCOVER:
|
|
||||||
case DHCPREQUEST:
|
|
||||||
case DHCPRELEASE:
|
|
||||||
case DHCPINFORM:
|
|
||||||
packet->op = BOOTREQUEST;
|
|
||||||
break;
|
|
||||||
case DHCPOFFER:
|
case DHCPOFFER:
|
||||||
case DHCPACK:
|
case DHCPACK:
|
||||||
case DHCPNAK:
|
case DHCPNAK:
|
||||||
|
Loading…
Reference in New Issue
Block a user