Mercurial > ecos
changeset 1242:bc69956ed7c9
Handle DHCP retries
| author | gthomas |
|---|---|
| date | Tue, 23 Sep 2003 17:08:31 +0000 |
| parents | 9004e9173e0e |
| children | 4f0c5ba87a3a |
| files | packages/redboot/current/ChangeLog packages/redboot/current/src/net/bootp.c |
| diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,8 @@ +2003-09-23 Gary Thomas <gary@mlbassoc.com> + + * src/net/bootp.c (__bootp_find_local_ip): Handle retries on DHCP + requests better. + 2003-09-22 Gary Thomas <gary@mlbassoc.com> * cdl/redboot.cdl: Fix compile error for systems with no FLASH.
--- a/packages/redboot/current/src/net/bootp.c +++ b/packages/redboot/current/src/net/bootp.c @@ -213,6 +213,7 @@ int p = b.bp_vend; switch (dhcpState) { case DHCP_NONE: + case DHCP_DISCOVER: AddOption(p,dhcpCookie); AddOption(p,dhcpDiscover); AddOption(p,dhcpParamRequestList); @@ -220,6 +221,7 @@ int dhcpState = DHCP_DISCOVER; break; case DHCP_OFFER: + case DHCP_REQUEST: retry = MAX_RETRIES; AddOption(p,dhcpCookie); AddOption(p,dhcpRequest); @@ -231,8 +233,6 @@ int memset(&b.bp_yiaddr, 0xFF, 4); memset(&b.bp_siaddr, 0xFF, 4); break; - case DHCP_DISCOVER: - case DHCP_REQUEST: case DHCP_ACK: // These states should never occur here! diag_printf("Invalid DHCP state: %d\n", dhcpState);
