From 2475a654c5775a54fb5f3fb01dfed23017628ac3 Mon Sep 17 00:00:00 2001 From: Richard Peters Date: Sat, 26 Oct 2024 20:51:24 +0200 Subject: [PATCH] Stop autoip when dhcp is stopped --- src/core/ipv4/dhcp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index 6201055d..1dfb4624 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -1394,6 +1394,11 @@ dhcp_release_and_stop(struct netif *netif) dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ dhcp->pcb_allocated = 0; } + +#if LWIP_DHCP_AUTOIP_COOP + /* If autoip was started, stop it to avoid that it sets an ip address after conflict resolution */ + autoip_stop(netif); +#endif /* LWIP_DHCP_AUTOIP_COOP */ } /**