Hello,
We are using version 2.1.0 of lwIP and are having some issues regarding the
synchronization between lwIP obtaining a DHCP lease and our application
calling the sockets API. When configured for DHCP, if we attempt to call
lwip_connect before a DHCP lease has been obtained the lwip_connect call
appears to block indefinitely despite the socket being set to nonblocking.
Our lwIP implementation works as expected with static a IP. A simplified
sequence of the problem:
1) Start lwIP
2) Call netifapi_dhcp_start
3) DHCP discovery starts
4) Attempt to connect <-- Blocks forever here

This leaves us with two questions:
1) Why does connect() block indefinitely in this situation? Shouldn't it
return an error? Our other RTOS using FreeBSD as its network stack returns
an error (EPERM) on the connect call until an address is obtained -- where
it succeeds.
2) Is there any requirement on waiting until the DHCP negotiation completes
before using the sockets API?

Kind regards,
Kevin S

-- 
K. Strell
Software Engineering
aerotech.com
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to