This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: [ECOS] BOOTP problem
- From: Jay Foster <jay at systech dot com>
- To: 'Alexey Shusharin' <mrfinch at mail dot ru>, Andrew Lunn <andrew at lunn dot ch>
- Cc: Jay Foster <jay at systech dot com>, ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 11 Feb 2008 09:43:06 -0800
- Subject: RE: [ECOS] BOOTP problem
I added the CYGOPT_NET_FREEBSD_STACK_ACCEPT_UNICAST CDL option a while back,
and I am the author of the associated description. I also use both DHCP and
BOOTP and found that BOOTP wasn't working. I tracked it down to the in the
Free BSD network stack code that the BOOTP_COMPAT conditional needed to be
turned on to allow BOOTP to work. I added the
CYGOPT_NET_FREEBSD_STACK_ACCEPT_UNICAST simply as a means for eCos
developers to define the Free BSD stack BOOTP_COMPAT conditional if they
needed to use BOOTP.
The BOOTP_COMPAT is a Free BSD network stack option, so why it's there would
need to be answered by the BSD folks. I suspect that it was put in because
most applications use only DHCP, and the ability to accept a unicast network
packet when the interface address isn't set may have been considered a
security issue. The BSD maintainers probably added the BOOTP_COMPAT
conditional to permit users to re-anable this functionality to allow BOOTP
to work. (THIS IS SPECULATION).
The link between wanting to use BOOTP and needing to enable the
CYGOPT_NET_FREEBSD_STACK_ACCEPT_UNICAST option is not obvious and weak at
best. How best to impart this association/information isn't obvious to me
(some additional CDL configury, documentation, just search the eCos-discuss
archives, just search the source code (as I did)). If you do search the
eCos source for "BOOTP" or "bootp" you will find the
CYGOPT_NET_FREEBSD_STACK_ACCEPT_UNICAST option.
Jay
-----Original Message-----
From: Alexey Shusharin [mailto:mrfinch@mail.ru]
Sent: Monday, February 11, 2008 1:10 AM
To: Andrew Lunn
Cc: Jay Foster; ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] BOOTP problem
Ð ÐÐÐ, 11/02/2008 Ð 09:45 +0100, Andrew Lunn ÐÐÑÐÑ:
> On Mon, Feb 11, 2008 at 12:44:37PM +0600, Alexey Shusharin wrote:
> >
> > ?? ??????, 08/02/2008 ?? 08:39 -0800, Jay Foster ??????????:
> > > If you use the latest sources from CVS, you should enable the
> > > CYGOPT_NET_FREEBSD_STACK_ACCEPT_UNICAST option to define BOOTP_COMPAT.
This
> > > will permit BOOTP to work. This assumes that you are using the Free
BSD
> > > network stack.
> > >
> > > Jay
> >
> > Hi,
> >
> > It works! Thanks Jay!
> >
> > I think this dependence should be declared in cdl script. What do
> > network stack gurus think about adding new option to
> > CYGHWR_NET_DRIVER_ETH0_BOOTP (and of course to eth1) component?
> >
> > cdl_option CYGHWR_NET_DRIVER_ETH0_FREEBSD_BOOTP_COMPAT {
> > display "Enable FreeBSD stack option for bootp compatibility."
> > flavor none
> > no_define
> >
> > active_if CYGPKG_NET_FREEBSD_STACK
> > active_if !CYGHWR_NET_DRIVER_ETH0_DHCP
> >
> > requires CYGOPT_NET_FREEBSD_STACK_ACCEPT_UNICAST
> > }
> >
> > If it's proper i will send a patch.
>
> Hi Alexey, Jay
>
> This a generic problem with all BOOTP server, or just some BOOTP
> servers which don't behave as specified in the RFC?
>
> Andrew
>
Hi Andrew
As i understand it's generic problem. Maybe some BOOTP servers send
broadcast BOOTREPLY message, but it's not usually.
The FreeBSD stack option says itself:
cdl_option CYGOPT_NET_FREEBSD_STACK_ACCEPT_UNICAST {
display "Accept unicast packets on INADDR_ANY interfaces"
flavor bool
no_define
define BOOTP_COMPAT
default_value 0
description "This option enables passing of unicast
IP packets to the application, when the interface
IP address is configured as INADDR_ANY (0.0.0.0).
This option is useful for some applications that
need to receive unicast IP packets when the interface
address is unknown. Such an application is bootp."
}
Alexey
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss