public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] DHCP regression on 2009-06
@ 2009-07-10 16:27 Robin Getz
  2009-07-10 19:18 ` Robin Getz
  0 siblings, 1 reply; 12+ messages in thread
From: Robin Getz @ 2009-07-10 16:27 UTC (permalink / raw)
  To: u-boot

http://git.denx.de/?p=u-boot/u-boot-net.git;a=commitdiff;h=3c172c4fdbbb5858fae38478d6399be4a16be3fc

causes a regression on my network's DHCP server.

The part of the diff that causes the problem:

 #if defined(CONFIG_CMD_DHCP)

                case DHCP:
-                       /* Start with a clean slate... */
                        BootpTry = 0;
-                       NetOurIP = 0;
-                       NetServerIP = getenv_IPaddr ("serverip");
                        DhcpRequest();          /* Basically same as BOOTP */
                        break;

Since we are leaving the "NetOurIP" to whatever it was... The test at:
NetReceive():

         case PROT_IP:
            [snip]
                tmp = NetReadIP(&ip->ip_dst);
                if (NetOurIP && tmp != NetOurIP && tmp != 0xFFFFFFFF) {
#ifdef CONFIG_MCAST_TFTP
                        if (Mcast_addr != tmp)
#endif
                        return;
                }

Will return - (we leave the 'NetOurIP' set to the old value, the offered 
address (what is in tmp) is not our's and tmp is not 0xFFFFFFFF).

You never process the DHCP_OFFER...

There are multiple ways of fixing things - setting "NetOurIP = 0;" (revert one 
line of the change, which may expose the bug that Michael was trying to fix), 
or try to be more tricky in the "not our address" check....

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-07-15  5:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10 16:27 [U-Boot] DHCP regression on 2009-06 Robin Getz
2009-07-10 19:18 ` Robin Getz
2009-07-12 13:14   ` Michael Zaidman
2009-07-12 14:43     ` Wolfgang Denk
2009-07-12 19:47     ` Robin Getz
2009-07-13 15:11       ` Michael Zaidman
2009-07-13 15:58         ` Robin Getz
2009-07-13 18:40         ` Robin Getz
2009-07-14  9:26           ` Michael Zaidman
2009-07-14 14:57             ` Ben Warren
2009-07-15  5:19               ` Michael Zaidman
2009-07-15  5:20                 ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox