]> git.sur5r.net Git - u-boot/commitdiff
DHCP regression on 2009-06
authorMichael Zaidman <michael.zaidman@gmail.com>
Tue, 14 Jul 2009 20:37:12 +0000 (23:37 +0300)
committerBen Warren <biggerbadderben@gmail.com>
Thu, 23 Jul 2009 05:53:45 +0000 (22:53 -0700)
Fixed the DHCP/BOOTP/RARP regression introduced in u-boot-2009.06
by initializing our IP addr to 0 in order to accept any IP addr
assigned to us by the DHCP/BOOTP/RARP server.

Ack-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
net/net.c

index 4bbe5313c3e2124938649919636b0025bf98b01c..7ce947db3003b4d9de05e7f749983655f371150c 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -394,17 +394,20 @@ restart:
 #if defined(CONFIG_CMD_DHCP)
                case DHCP:
                        BootpTry = 0;
+                       NetOurIP = 0;
                        DhcpRequest();          /* Basically same as BOOTP */
                        break;
 #endif
 
                case BOOTP:
                        BootpTry = 0;
+                       NetOurIP = 0;
                        BootpRequest ();
                        break;
 
                case RARP:
                        RarpTry = 0;
+                       NetOurIP = 0;
                        RarpRequest ();
                        break;
 #if defined(CONFIG_CMD_PING)