* [U-Boot] Fix potential empty DHCP Parameter Request List
@ 2010-10-19 14:04 Gray Remlin
2010-10-19 14:23 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Gray Remlin @ 2010-10-19 14:04 UTC (permalink / raw)
To: u-boot
Signed-off-by: Gray Remlin <g_remlin@rocketmail.com>
---
net/bootp.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/net/bootp.c b/net/bootp.c
index e679f8b..1289e3b 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -417,8 +417,21 @@ static int DhcpExtended (u8 * e, int message_type,
IPaddr_t ServerID, IPaddr_t R
return x - start;
#endif
+/*
+ * RFC2132: An empty Parameter Request List is not legitimate,
+ * it must have at minimum one request.
+ */
+#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 = e++; /* Pointer to count of requested items */
*cnt = 0;
#if defined(CONFIG_BOOTP_SUBNETMASK)
*e++ = 1; /* Subnet Mask */
@@ -456,6 +469,7 @@ static int DhcpExtended (u8 * e, int message_type,
IPaddr_t ServerID, IPaddr_t R
*e++ = 42;
*cnt += 1;
#endif
+#endif
*e++ = 255; /* End of the list */
/* Pad to minimal length */
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] Fix potential empty DHCP Parameter Request List
2010-10-19 14:04 [U-Boot] Fix potential empty DHCP Parameter Request List Gray Remlin
@ 2010-10-19 14:23 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2010-10-19 14:23 UTC (permalink / raw)
To: u-boot
Dear Gray Remlin,
In message <4CBDA586.6040008@rocketmail.com> you wrote:
> Signed-off-by: Gray Remlin <g_remlin@rocketmail.com>
>
> ---
> net/bootp.c | 16 +++++++++++++++-
> 1 files changed, 15 insertions(+), 1 deletions(-)
Why exactly are you reposting all your patches without any additional
comments?
Did you fail to read
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
?
Please explain the reasons for the repostings.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Virtual" means never knowing where your next byte is coming from.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-19 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 14:04 [U-Boot] Fix potential empty DHCP Parameter Request List Gray Remlin
2010-10-19 14:23 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox