This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Multiple network interface & routing question
This patch fixed my issue, thanks Andrew.
Looking at the code I think it is correct as well. Whoever originally
added the cyg_route_reinit() function knew it wasn't ideal as there is
this comment:
// FIXME: This function is only here because BOOTP fails on a second
interface.
// This failure is due to the fact that a route to 0.0.0.0 seems
to be
// incredibly sticky, i.e. can't be deleted. BOOTP uses this to
// achieve a generic broadcast. Sadly it seems that BOOTP
servers will
// only work this way, thus the hack.
//
// This version enumerates all IPv4 routes and deletes them -
this leaks less
// store than the previous version.
The patch does the same thing I think, it just only deletes IPv4 routes
for a specific interface.
Will.
Andrew Lunn wrote:
On Tue, Oct 09, 2007 at 12:25:42PM +0100, Will Wagner wrote:
Hi All,
I'm using the bsd sockets code and I have more than one interface. I am
seeing that when one interface has to reget an address via dhcp then I get
problems using the other interface.
Looking through the code it appears there might me a problem with the
routing table. The dhcp code calls cyg_route_reinit() in a couple of places
- do_dhcp_down_net() and bring_half_up() which are called whilst obtaining
an address. The cyg_route_reinit() function seems to just empty the routing
table regardless of interface.
Could this be my problem or am I looking in the wrong place? Anyone got any
code for removing all routes for a specific interface only?
There is a patch for that somewhere in ecos-patches, probably in the
last year. Although it looked O.K. i was not convinced it would work
in all situations. Why did the original author of the DHCP client not
do something similar?. I don't have a dual interface device so i
cannot test. So i would be interested in your comments about the
patch.
Andrew
--
------------------------------------------------------------------------
Will Wagner will_wagner@carallon.com
Senior Project Engineer Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss