This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Redboot responds to ICMP echo when it shouldn't.


On 03/21/2011 02:36 PM, Grant Edwards wrote:
On 2011-03-21, Gary Thomas<gary@mlbassoc.com> wrote:
On 03/21/2011 02:21 PM, Grant Edwards wrote:
While testing my rewrite of Redboot DHCP support, I've noticed that
Redboots "ping" support is also broken.  Redboot responds to ICMP echo
requests that it shouldn't.

Redboot will respond to ICMP echo requests _before_ it has received an
IP address from the BOOTP/DHCP server.  The destination IP address in
the ICMP echo packet _does_not_match_ Redboot's IP address, but it
responds anyway with a source IP address of 0.0.0.0.

Is this behavior intentional?

Not as far as I know.


How are those packets even being received?

The "pinging" host's ARP cache still has RedBoot's MAC address associated with the IP address bing pinged.

Are they going to a broadcast address (IP or ESA)?

Unicast Ethernet MAC, unicast IP.

This is happening because of a stale ARP cache on your host.



Normally incoming packets are filtered by ESA by the network driver
before they get pushed up the stack and processed.

Right. And then the IP layer should filter them by IP address, right?


You might find that RedBoot replies to [some, maybe all] packets
which somehow match it's ESA, but not IP address as well.

That appears to be the case.


I assumed that devices shouldn't respond to ICMP ping requests that
don't match their IP address.  Am I wrong?

No, I think you are correct. The IP code may match if the local IP address is set to IPANY (i.e. 0.0.0.0).


The DHCP server (which is sending the ICMP echo request before offering an IP address) appears to be ignoring the reply from IP address 0.0.0.0, but I can imagine somewhat contrived situations where it might cause problems.

This seems to be a pretty rare condition, caused by a stale ARP cache.


--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]