summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko2008-02-20 22:33:38 +0000
committerDenis Vlasenko2008-02-20 22:33:38 +0000
commita523e2efad954e93e5e63aa3bf5ac5dd32bf2c13 (patch)
tree8479f27a3e411ab147a86600de0a28a723dddcf1 /networking
parent84da0bf4754bdb695d2a984c2326992e52bba9e0 (diff)
downloadbusybox-a523e2efad954e93e5e63aa3bf5ac5dd32bf2c13.zip
busybox-a523e2efad954e93e5e63aa3bf5ac5dd32bf2c13.tar.gz
udhcp: we were forgetting to set right op byte in tha packet
for DHCPDECLINE. Fixing, and making code smaller.
Diffstat (limited to 'networking')
-rw-r--r--networking/udhcp/packet.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c
index 443fea6..fb6ef71 100644
--- a/networking/udhcp/packet.c
+++ b/networking/udhcp/packet.c
@@ -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: