This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: RedBoot: __eth_install_handler?
- To: Grant Edwards <grante at visi dot com>
- Subject: Re: [ECOS] RedBoot: __eth_install_handler?
- From: Gary Thomas <gthomas at cambridge dot redhat dot com>
- Date: Mon, 22 Jan 2001 15:51:13 -0700 (MST)
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat, Inc.
On 22-Jan-2001 Grant Edwards wrote:
> On Mon, Jan 22, 2001 at 02:57:41PM -0600, Grant Edwards wrote:
>>
>> > > In RedBoot's net.h file, there's a declaration for
>> > > __eth_install_handler(), which would seem from the declaration to
>> > > do exactly what I want to do: set a call-back to handle packets
>> > > with Ethernet protocol type <whatever>.
>> > >
>> > > That functionality hasn't been implemented, so I'm about to
>> > > implement it.
>
> It doesn't look like the packet handler routines verify that
> the length of a received Ethernet frame is long enough to
> contain the amount of data expected. For example, the IP
> handler doesn't check to make sure that the number of bytes in
> the Ethernet frame was was large enough to hold the amount of
> data claimed in the IP header.
>
> The only way for that to happen would be for another host to
> intentionally send a short Ethernet frame (AFAIK). Even if that
> happens it should be caught by the checksum verification,
> right?
>
That would certainly be true - the checksum routines will try
and access the advertised length of data. I see no way that the
computed value would match if the actual data was too short.