This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: RedBoot DHCP broken?
On Tue, 2003-09-23 at 10:56, Chris Garry wrote:
> > > When I build RedBoot with the latest sources, DHCP is not working.
> > > I get the following output from RedBoot:
> > >
> > > ... waiting for BOOTP information
> > > Invalid DHCP state: 1
> > > Can't get BOOTP info, using default IP address
> > >
> > > All other network operations are working okay.
> > >
> > > When I use Ethereal to check the packets sent at boot time, no packets
> > > are seen from RedBoot at all.
> > >
> > > After a quick bit of debugging it seems that in the file
> > > redboot\current\src\net\bootp.c in the function
> > > __bootp_find_local_ip()
> > >
> > > the function call:
> > > __udp_send((char *)&b, txSize, &r, IPPORT_BOOTPS, IPPORT_BOOTPC);
> > > at line 250 is called and returns a value 0, but no packets make it out onto the
> > > wire. Thus when the subsequent code is waiting for a response, it does not
> > > get one.
> > >
> > > Has anybody else built RedBoot with the latest code and seen/not seen
> > > this problem?
> >
> > No, I've not seen this problem, but I am interested since I [obviously]
> > broke it for you. A few questions:
> > * Did it work before?
>
> Yes, it did work before.
>
> > * Is your server set up for DHCP, or BOOTP only?
>
> DHCP only.
>
> > * Have you seen the traffic before these changes? [This might just be
> > a network snoop issue]
>
> I had not seen the traffic before - never bothered looking. However, I can see
> the traffic for operations that currently work (ping and so on).
>
Is this on the same machine as the DHCP server? If not, you might not
be able to see that traffic, depending on your network hardware. If you
are using a network switch, then there may be much traffic that you
can't actually snoop.
> > * Try forcing the network debug code on.
> > Can you try things with the attached patch? Let me know what you find.
> >
>
> Tried the patch, and it is now working!
Good, but I'm a little confused by it. It may be the case that
your DHCP server is a bit slow. The change makes the RedBoot
code more resilient when it has to retry.
In any case, since it helps I'll commit the changes.
> The output is now:
>
> ... waiting for BOOTP information
> Ethernet eth0: MAC address de:ad:be:ef:00:01
> IP: 192.168.11.91/255.255.255.0, Gateway: 192.168.11.1
> Default server: 0.0.0.0, DNS server IP: 0.0.0.0
>
> I assume the 'Default server' and 'DNS server IP' values are
> taken from the config area in FLASH rather than the DHCP
> server.
The server IP *can* come from the DHCP server, but it may not.
Some servers don't provide this, others do.
Currently the DNS IP only comes from 'fconfig'
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss