Skip to content
Snippets Groups Projects
Commit 258ccd68 authored by Jason Liu's avatar Jason Liu Committed by Wolfgang Denk
Browse files

net: Fix potential empty DHCP Parameter Request List


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: default avatarJason Liu <r64343@freescale.com>
Signed-off-by: default avatarGray Remlin <g_remlin@rocketmail.com>
parent 6d1d51b3
No related branches found
No related tags found
No related merge requests found
......@@ -456,6 +456,10 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R
*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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment