Skip to contentSkip to conversation

fix dhcp command retry

PATCH New roger blofeld 2 participants 2 messages Sep 16, 2004 – Oct 11, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix dhcp command retry

Hi
If the dhcp command fails and retries, it does not reset the BOOTP
counter:
=> dhcp
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.0.207
Using FEC ETHERNET device
TFTP from server 192.168.0.1; our IP address is 192.168.0.207 Filename 'MPC5200/uImage'.
Load address: 0x100000
Loading: ###T ###T ###T ###T ###T ##T ###T ###T ###T ###T ### Retry count exceeded; starting again
BOOTP broadcast 4
BOOTP broadcast 5

Retry count exceeded; starting again
BOOTP broadcast 6

Retry count exceeded; starting again

The patch below fixes the problem for me
-roger

===================================================================
RCS file: /cvsroot/u-boot/u-boot/net/net.c,v
retrieving revision 1.16

net.c 16 Sep 2004 18:00:01 -0000 renamed from net.c 2 Aug 2004 21:11:29 -0000 1.16 +1 -0
diff -u -r1.16 net.c
@@ -383,6 +383,7 @@
                        /* Start with a clean slate... */
                        NetOurIP = 0;
                        NetServerIP = getenv_IPaddr ("serverip");
+                       BootpTry = 0;
                        DhcpRequest();          /* Basically same as

BOOTP */

                        break;

#endif /* CFG_CMD_DHCP */

__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

#1 lore raw

PATCH 1/1 fix dhcp command retry

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

If the dhcp command fails and retries, it does not reset the BOOTP
counter:

...

Quoted 1 line

The patch below fixes the problem for me

Added, thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
The connection between the language in which we think/program and the
problems and solutions we can imagine is very close. For this  reason
restricting  language  features  with  the intent of eliminating pro-
grammer errors is at best dangerous.
               - Bjarne Stroustrup in "The  C++ Programming Language"