[U-Boot-Users] [PATCH] DHCP Client Fix

Justin Flammia jflammia at savantav.com
Fri Oct 19 16:15:29 CEST 2007


I recently upgraded the firmware on some of my old Linksys WRT54G routers (version 5) from firmware version 1.0.6 to firmware version 1.02.2, both of which are released by Linksys and U-Boot was no longer able to get an IP address using DHCP.  However, with the older firmware (version 1.0.6), U-Boot was still able to get an IP through DHCP.

Using a hub and a packet sniffer, I was able to locate the problem.  The U-Boot code will bind to an IP address offered by the DHCP server prematurely and the DHCP server will not respond with an ACK, rendering the system without an IP address.  This is no longer valid when using a Linksys router as DHCP server.  I modified the code to operate the way the Linux DHCP client does by not binding to the offered IP until the DHCP client receives the ACK sent by the server, ending the conversation.  After making the appropriate changes, DCHP service was restored for all flavors of the Linksys firmware that I have available (v 1.02.2 and v1.0.6 for the version 5 router, v8.00.2 for the version 8 router).  It has also been tested on an AirPort Extreme router running DHCP.

Attached is the patch with the code changes that were made. Any feed back would be appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071019/367760be/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bootp.patch
Type: application/octet-stream
Size: 999 bytes
Desc: bootp.patch
Url : http://lists.denx.de/pipermail/u-boot/attachments/20071019/367760be/attachment.obj 


More information about the U-Boot mailing list