Hello, I have a similar problem (maybe the same?).
Not only with listening TCP sockets but also with already open TCP sockets. When the IP address changes the lwip stack has unexpected behavior. Sometimes no more data arrives, sometimes it arrives but the source address is wrong, sometimes it arrives whether the sender sends to the old or to the new address. One of the scenarios in which this happens is the following: I have LWIP_DHCP, LWIP_AUTOIP, LWIP_DHCP_AUTOIP_COOP set to 1. My application starts but there is no DHCP server in the network, so it assigns itself an autoip address (169.254.x.x). Afterwards a DHCP server is connected to the network, and my application will receive a new address when it queries it. From that point on the lwip stack seems to "break". I use lwip STABLE-2_1_3_RELEASE (commit 6ca936f6b588cee702c638eee75c2436e6cf75de) best regards Max On 29/04/22 15:18, Amena El Homsi wrote: Hi, When we call netif_remove(), tcp_netif_ip_addr_changed() is called. In this case old_addr is not null and new_addr is null, which means that tcp_netif_ip_addr_changed_pcblist() will be called to abort active and bound pcbs. However, since new_addr is null, the listening pcbs are not updated and they are still listening to the old addr. When we start a new DHCP session and we get an IP address, tcp_netif_ip_addr_changed() is called. However, since old_addr is NULL, the listening PCBs will not be updated. We should have a way to update the listening PCBs ip address even when the old_addr is null. Am I right or wrong? -- Amena El-Homsi Computer & Communication Engineer Dipl. Eng, M.S. _______________________________________________ lwip-users mailing list lwip-users@nongnu.org<mailto:lwip-users@nongnu.org> https://lists.nongnu.org/mailman/listinfo/lwip-users Massimiliano Cialdi FIRMWARE ENGINEERING PROFESSIONAL LEADER Powersoft S.p.A. Via E. Conti, 5 - Scandicci (Fi) 50018 - Italy OFFICE: +39 055 7350230 <http://www.powersoft-audio.com/en/>[cid:PS_553e4174-d089-4113-aa68-7863aa6108ea.png]<http://www.powersoft-audio.com/en/> [cid:FB_c651e92c-f558-4470-9dc8-0cde2dc49cf4.png] <https://www.facebook.com/powersoft> [cid:Teams_6088ac53-fdc7-460a-97b3-533e03f1ad3d.png] <https://teams.microsoft.com/l/chat/0/0?users=massimiliano.cia...@powersoft.com> [cid:IN_2180daad-e9b1-4c84-9ac3-d130a49ed1c3.png] <https://www.linkedin.com/company/powersoft> <https://www.linkedin.com/company/powersoft> [cid:YT_c74db1a3-a814-4e66-b04f-15ff9bd7940d.png] <https://www.youtube.com/user/powersoftaudio> <https://www.youtube.com/user/powersoftaudio> [cid:IG_b8aafa87-2c84-4406-9c9e-91da1b7684d0.png] <https://www.instagram.com/powersoft.audio/> <https://www.instagram.com/powersoft.audio/> <http://www.powersoft-audio.com/en/>
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users