First of all, it always helps to know which version you are using (so I know which files I have to search in). Then, since you are using an OS, are you calling the below functions from tcpip_thread or from another thread (or interrupt context)? You may only call them from tcpip_thread since they are accessing raw api functions!

Benjamin Schelte wrote:

[..]

So the problem occurs after calling the function *iEthCtrl_UseDHCP().*

After doing so it sometimes happens to stop executing on an assert in dhcp_create_request().

Assert:

LWIP_ASSERT("dhcp_create_request: dhcp->p_out == NULL", dhcp->p_out == NULL);

Callstack:

dhcp_create_request

dhcp_select

dhcp_handle_offer

dhcp_recv

udp_input

ip_input

ethernet_input

tcpip_thread

So my questions are the following.

Why is a DHCP-request forwarded to the DHCP-handler, although dhcp_stop() has been called before?


Ehrm, above you said it happened after calling xxx_UseDHCP(), which calls dhcp_start(), so I guess it's correct that the DHCP handler is called, isn't it? As to the assert, from looking at the code (of lwIP version 1.3.2), I can't tell what's going wrong, the assert shouldn't happen with the callstack you provided... Aside from that, your code seems to look OK, but I didn't have the time to actually check it.

Simon
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to