svn commit: trunk/busybox/networking/udhcp

vda at busybox.net vda at busybox.net
Wed Feb 20 22:33:38 UTC 2008


Author: vda
Date: 2008-02-20 14:33:38 -0800 (Wed, 20 Feb 2008)
New Revision: 21081

Log:
udhcp: we were forgetting to set right op byte in tha packet
for DHCPDECLINE. Fixing, and making code smaller.



Modified:
   trunk/busybox/networking/udhcp/packet.c


Changeset:
Modified: trunk/busybox/networking/udhcp/packet.c
===================================================================
--- trunk/busybox/networking/udhcp/packet.c	2008-02-20 22:29:52 UTC (rev 21080)
+++ trunk/busybox/networking/udhcp/packet.c	2008-02-20 22:33:38 UTC (rev 21081)
@@ -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:




More information about the busybox-cvs mailing list