On 10/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > > I find your mail below in the ecos-discuss and I got the same problem on an > ecosPRO 2.0.66.
Here is the solution to our problem with DHCP renewals: Index: net/common/v2_0_51/src/dhcp_support.c =================================================================== RCS file: /cvs/ecos/ecos-opt/net/net/common/v2_0_51/src/dhcp_support.c,v retrieving revision 1.2.10036.1 diff -u -5 -p -r1.2.10036.1 dhcp_support.c --- net/common/v2_0_51/src/dhcp_support.c 9 Nov 2004 10:49:41 -0000 1.2.10036.1 +++ net/common/v2_0_51/src/dhcp_support.c 23 Aug 2007 15:24:33 -0000 @@ -111,15 +111,17 @@ int dhcp_bind( void ) cyg_semaphore_init( &dhcp_needs_attention, 0 ); // Run the state machine... #ifdef CYGHWR_NET_DRIVER_ETH0 if (eth0_up + && 0 != eth0_dhcpstate && DHCPSTATE_FAILED != eth0_dhcpstate ) eth0_up = do_dhcp(eth0_name, ð0_bootp_data, ð0_dhcpstate, ð0_lease); #endif #ifdef CYGHWR_NET_DRIVER_ETH1 if (eth1_up + && 0 != eth1_dhcpstate && DHCPSTATE_FAILED != eth1_dhcpstate ) eth1_up = do_dhcp(eth1_name, ð1_bootp_data, ð1_dhcpstate, ð1_lease); #endif // If the interface newly came up, initialize it: > My purpose is to initialize 2 Ethernet interfaces in a separate thread > because sometime one of them can be unplugged and then, we want to continue > the application on the plugged interface and, in the meantime, we want the > other one to wait until an ethernet link. > So that, I can't use init_all_network_interface(). > > Then I notice that : > - When the Eth0 (with static adress) is initialized before the second one > (with DHCP configuration), the DISCOVER packet never make it out onto the > wire. > - When the Eth0 (with static adress) is initialized after the second one > (with DHCP configuration), it works fine. > - When the 2 interfaces are initializes with static adress, it works fine. > You should search the eCosCentric bug tracker (http://bugzilla.ecoscentric.com). We found another bug with DHCP and they supplied a huge patch. If you have eCosPro you should be able to search for the bug report. If you don't find the bug report, try submitting one. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss