summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Goldschmidt <[email protected]>2019-02-18 13:15:37 +0100
committerSimon Goldschmidt <[email protected]>2019-02-18 13:15:37 +0100
commit91a4d59eb4232ead071864c73ce34c706e84a88b (patch)
treea2cee3b6caf8cdbda3bae5a4d136303e38d42998
parent1bd34ea364fb2e987dac15ce5ecd7c5c7dcae751 (diff)
dhcp_release_and_stop: don't clear netif ip address that was not assigned by dhcp.c
See bug #55380
-rw-r--r--src/core/ipv4/dhcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c
index 534574fe..96cacbbc 100644
--- a/src/core/ipv4/dhcp.c
+++ b/src/core/ipv4/dhcp.c
@@ -1365,10 +1365,10 @@ dhcp_release_and_stop(struct netif *netif)
/* sending release failed, but that's not a problem since the correct behaviour of dhcp does not rely on release */
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n"));
}
- }
- /* remove IP address from interface (prevents routing from selecting this interface) */
- netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
+ /* remove IP address from interface (prevents routing from selecting this interface) */
+ netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
+ }
#if LWIP_DHCP_AUTOIP_COOP
if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) {