Can't get IP address with dhcp due to the dhcp server not
allow the empty param list request under some network env
This patch is based on Gray Remlin's initial patch.
Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Gray Remlin <g_remlin@rocketmail.com>
*e++ = 42;
*cnt += 1;
#endif
+ /* no options, so back up to avoid sending an empty request list */
+ if (*cnt == 0)
+ e -= 2;
+
*e++ = 255; /* End of the list */
/* Pad to minimal length */