public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] net:Fix potential empty DHCP Parameter Request List
@ 2010-10-22  8:36 Jason Liu
  2010-10-22  9:31 ` Wolfgang Denk
  2010-10-22 20:06 ` Mike Frysinger
  0 siblings, 2 replies; 6+ messages in thread
From: Jason Liu @ 2010-10-22  8:36 UTC (permalink / raw)
  To: u-boot

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;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-14  3:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22  8:36 [U-Boot] [PATCH 1/1] net:Fix potential empty DHCP Parameter Request List Jason Liu
2010-10-22  9:31 ` Wolfgang Denk
2010-10-22 11:48   ` Jason Liu
2010-10-22 12:04     ` Wolfgang Denk
2010-10-22 20:06 ` Mike Frysinger
2010-11-14  3:58   ` Jason Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox