Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/core/ipv4/autoip.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,14 @@ autoip_network_changed_link_up(struct netif *netif)
{
struct autoip *autoip = netif_autoip_data(netif);

if (autoip && (autoip->state != AUTOIP_STATE_OFF) && !LWIP_DHCP_AUTOIP_COOP) {
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE,
if (autoip && (autoip->state != AUTOIP_STATE_OFF)) {
#if !LWIP_DHCP_AUTOIP_COOP
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE,
("autoip_network_changed_link_up(): start acd\n"));
autoip->state = AUTOIP_STATE_CHECKING;
/* Start acd check again for the last used address */
acd_start(netif, &autoip->acd, autoip->llipaddr);
autoip->state = AUTOIP_STATE_CHECKING;
/* Start acd check again for the last used address */
acd_start(netif, &autoip->acd, autoip->llipaddr);
#endif
}
}

Expand All @@ -323,10 +325,12 @@ autoip_network_changed_link_down(struct netif *netif)
{
struct autoip *autoip = netif_autoip_data(netif);

if (autoip && (autoip->state != AUTOIP_STATE_OFF) && LWIP_DHCP_AUTOIP_COOP) {
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE,
if (autoip && (autoip->state != AUTOIP_STATE_OFF)) {
#if LWIP_DHCP_AUTOIP_COOP
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE,
("autoip_network_changed_link_down(): stop autoip\n"));
autoip_stop(netif);
autoip_stop(netif);
#endif
}
}

Expand Down