udhcp: we were forgetting to set right op byte in tha packet
authorDenis Vlasenko <vda.linux@googlemail.com>
Wed, 20 Feb 2008 22:33:38 +0000 (22:33 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Wed, 20 Feb 2008 22:33:38 +0000 (22:33 -0000)
for DHCPDECLINE. Fixing, and making code smaller.

networking/udhcp/packet.c

index 443fea6dd95b18792a7ff9070a4b597b8745846a..fb6ef71752d49dda679feeed6b7554d7b7104882 100644 (file)
 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: