lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] FW: Problem with renewing DHCP after link down/up with


From: address@hidden
Subject: Re: [lwip-users] FW: Problem with renewing DHCP after link down/up with the new LWIP V2.0.2
Date: Fri, 30 Mar 2018 10:43:49 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 30.03.2018 10:40, address@hidden wrote:
[..]
Now I'm trying to reconnect the Ethernet cable to another network (different
address area). The device sends a DHCP request which is a broadcast, but the
source is the IP address of the device from the former network and probably
as it is expected, it is not answered. I'm wondering how can I handle this
situation too? Should I use dhcp_stop(), dhcp_start() to be able to handle
all situations by reconnecting instead of dhcp_renew()?

Ehrm, when reconnecting the link, you should now call dhcp_renew() at all. Instead, call dhcp_network_changed(). This function does the correct thing depending on dhcp state. In your situation, it will call dhcp_reboot(), which should try to renew the lease and if that fails request a new one via broadcast.

Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]