aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-20 22:33:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-20 22:33:38 +0000
commita523e2efad954e93e5e63aa3bf5ac5dd32bf2c13 (patch)
tree8479f27a3e411ab147a86600de0a28a723dddcf1 /networking/udhcp
parent84da0bf4754bdb695d2a984c2326992e52bba9e0 (diff)
downloadbusybox-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/udhcp')
-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 443fea6dd..fb6ef7175 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: