Skip to contentSkip to conversation

Fix bad padding of bootp request packet

PATCH New Simon Glass 2 participants 5 messages Feb 2, 2011 – Apr 13, 2011 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix bad padding of bootp request packet

This seems to pad to one byte longer than required

Change-Id: I86a888a9f5f27356e260c0457d92468d5923a756

---
 net/bootp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/bootp.c +1 -1
index 1a71786..87b027e 100644
@@ -464,7 +464,7 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R
 
 	/* Pad to minimal length */
 #ifdef	CONFIG_DHCP_MIN_EXT_LEN
-	while ((e - start) <= CONFIG_DHCP_MIN_EXT_LEN)
+	while ((e - start) < CONFIG_DHCP_MIN_EXT_LEN)
 		*e++ = 0;
 #endif
 
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 Fix bad padding of bootp request packet

Dear Simon Glass,

Quoted 3 lines · In message <[email protected]> you wrote:

This seems to pad to one byte longer than required

Change-Id: I86a888a9f5f27356e260c0457d92468d5923a756

What is this "Change-Id:" supposed to mean?

Best regards,

Wolfgang Denk

Signature · 5 lines
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
Keep your head and your heart going in the right  direction  and  you
will not have to worry about your feet.
#2 lore raw

PATCH 1/1 Fix bad padding of bootp request packet

Quoted 8 lines · Wolfgang Denk

Dear Simon Glass,

Quoted 3 lines · In message <[email protected]> you wrote:

This seems to pad to one byte longer than required

Change-Id: I86a888a9f5f27356e260c0457d92468d5923a756

What is this "Change-Id:" supposed to mean?

It is something that comes out of a code review system and I have to remember to manually remove as part of the submission process. I'm sorry that I forgot in this case. I should perhaps look at creating a script which checks this for me so that it doesn't happen again.

- Simon

Quoted 12 lines

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 Keep your head and your heart going in the right ?direction ?and ?you will not have to worry about your feet.

#3 lore raw

PATCH 1/1 Fix bad padding of bootp request packet

In reply to Simon Glass

Dear Simon Glass,

Quoted 14 lines · In message <[email protected]> you wrote:

This seems to pad to one byte longer than required

Change-Id: I86a888a9f5f27356e260c0457d92468d5923a756

---
 net/bootp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/bootp.c +0 -0
index 1a71786..87b027e 100644

net/bootp.c static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R · line 469

Quoted 7 lines
net/bootp.c +1 -1
@@ -464,7 +464,7 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R
 
 	/* Pad to minimal length */
 #ifdef	CONFIG_DHCP_MIN_EXT_LEN
-	while ((e - start) <= CONFIG_DHCP_MIN_EXT_LEN)
+	while ((e - start) < CONFIG_DHCP_MIN_EXT_LEN)
 		*e++ = 0;
 #endif

Applied (after removing the Change-Id line from the commit message; hope this is OK).

Best regards,

Wolfgang Denk

Signature · 4 lines
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
I have a very small mind and must live with it.    -- Edsger Dijkstra
#4 lore raw

PATCH 1/1 Fix bad padding of bootp request packet

Quoted 7 lines · Wolfgang Denk

Dear Simon Glass,

Quoted 1 line · In message <[email protected]> you wrote:

This seems to pad to one byte longer than required

Applied (after removing the Change-Id line from the commit message; hope this is OK).

Yes of course, thank you.

Regards,
Simon