mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
net: Handle an empty bootp extension section
Avoid generating this section if there is nothing in it. Signed-off-by: Andre Renaud <andre@designa-electronics.com> Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
b4d956f6bc
commit
166c409bc4
1 changed files with 9 additions and 0 deletions
|
|
@ -673,6 +673,15 @@ static int bootp_extended(u8 *e)
|
|||
|
||||
*e++ = 255; /* End of the list */
|
||||
|
||||
/*
|
||||
* If nothing in list, remove it altogether. Some DHCP servers get
|
||||
* upset by this minor faux pas and do not respond at all.
|
||||
*/
|
||||
if (e == start + 3) {
|
||||
printf("*** Warning: no DHCP options requested\n");
|
||||
e -= 3;
|
||||
}
|
||||
|
||||
return e - start;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue