From 93dc36e091b91155cd6fe00cfcf520a1f0e647d9 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 6 Oct 2010 11:40:30 +0000 Subject: [PATCH] Once again fixed #30038: DHCP/AutoIP cooperation failed when replugging the network cable after an AutoIP address was assigned. --- CHANGELOG | 4 ++++ src/core/dhcp.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 0d00a5e3..3576b19c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -229,6 +229,10 @@ HISTORY ++ Bugfixes: + 2010-10-05: Simon Goldschmidt + * dhcp.c: Once again fixed #30038: DHCP/AutoIP cooperation failed when + replugging the network cable after an AutoIP address was assigned. + 2010-08-10: Simon Goldschmidt * tcp.c: Fixed bug #30728: tcp_new_port() did not check listen pcbs diff --git a/src/core/dhcp.c b/src/core/dhcp.c index 37943ca6..0c60fc4f 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -762,7 +762,10 @@ dhcp_network_changed(struct netif *netif) default: dhcp->tries = 0; #if LWIP_DHCP_AUTOIP_COOP - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; + if(dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { + autoip_stop(netif); + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; + } #endif /* LWIP_DHCP_AUTOIP_COOP */ dhcp_discover(netif); break;