
From: Gray Remlin g_remlin@rocketmail.com
Can't get IP address with dhcp due to the dhcp server not allow the empty param list request under some network env
Signed-off-by: Gray Remlin g_remlin@rocketmail.com Signed-off-by: Jason Liu r64343@freescale.com --- net/bootp.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/net/bootp.c b/net/bootp.c index e679f8b..c87d0c2 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -417,9 +417,19 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R return x - start; #endif
+#if defined(CONFIG_BOOTP_SUBNETMASK) || \ + defined(CONFIG_BOOTP_TIMEOFFSET) || \ + defined(CONFIG_BOOTP_GATEWAY) || \ + defined(CONFIG_BOOTP_DNS) || \ + defined(CONFIG_BOOTP_HOSTNAME) || \ + defined(CONFIG_BOOTP_BOOTFILESIZE) || \ + defined(CONFIG_BOOTP_BOOTPATH) || \ + defined(CONFIG_BOOTP_NISDOMAIN) || \ + defined(CONFIG_BOOTP_NTPSERVER) *e++ = 55; /* Parameter Request List */ cnt = e++; /* Pointer to count of requested items */ *cnt = 0; +#endif #if defined(CONFIG_BOOTP_SUBNETMASK) *e++ = 1; /* Subnet Mask */ *cnt += 1;