Andrew Lunn wrote: > On Wed, Jan 23, 2008 at 04:11:11PM +0000, Dave Lawrence wrote: >> I can't seem to get DHCP work over multiple interfaces. > > The eCos DHCP client used to work with multiple interfaces. This is > why there is the half up states, so that it can force the packet out > the correct interface and the clearing of routes when performing DHCP > transactions. > > If it does not work, i suggest you work your way back and see which > patch broke it. > > Andrew > I had a look on an older platform that uses an older ecos tree. It does work but there were some problems: * Packets could come out on the wrong interface if two threads were simultaneously calling do_dhcp (on different interfaces) * Our application was also interfering with the routing tables in response to detecting devices going up / down So I don't have any opinion about whether my fixes are of use to the wider ecos world but I've attached a patch in case. It does the following: * Provide dhcp_get_lock and dhcp_release_lock as global functions which the application can use to ensure interference is avoided * Use these functions at the entry and exit points of do_dhcp to prevent it functioning reetrantly (is that a word?) Unfortunately I'm no closer to fixing the original problem - on my new platform packets for 255.255.255.255 *always* come out on eth1. Was I correct to continue with this thread or should I have switched to the patches list?