mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
Fixed bug #30039: AutoIP does not reuse previous addresses
This commit is contained in:
parent
435115d4fb
commit
5ab40f016d
@ -220,6 +220,9 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2010-06-14: Simon Goldschmidt
|
||||||
|
* autoip.c: Fixed bug #30039: AutoIP does not reuse previous addresses
|
||||||
|
|
||||||
2010-06-12: Simon Goldschmidt
|
2010-06-12: Simon Goldschmidt
|
||||||
* dhcp.c: Fixed bug #30038: dhcp_network_changed doesn't reset AUTOIP coop
|
* dhcp.c: Fixed bug #30038: dhcp_network_changed doesn't reset AUTOIP coop
|
||||||
state
|
state
|
||||||
|
@ -150,6 +150,17 @@ autoip_set_struct(struct netif *netif, struct autoip *autoip)
|
|||||||
netif->autoip = autoip;
|
netif->autoip = autoip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Restart AutoIP client and check the next address (conflict detected)
|
||||||
|
*
|
||||||
|
* @param netif The netif under AutoIP control
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
autoip_restart(struct netif *netif)
|
||||||
|
{
|
||||||
|
netif->autoip->tried_llipaddr++;
|
||||||
|
autoip_start(netif);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a IP address conflict after an ARP conflict detection
|
* Handle a IP address conflict after an ARP conflict detection
|
||||||
*/
|
*/
|
||||||
@ -168,7 +179,7 @@ autoip_handle_arp_conflict(struct netif *netif)
|
|||||||
("autoip_handle_arp_conflict(): we are defending, but in DEFEND_INTERVAL, retreating\n"));
|
("autoip_handle_arp_conflict(): we are defending, but in DEFEND_INTERVAL, retreating\n"));
|
||||||
|
|
||||||
/* TODO: close all TCP sessions */
|
/* TODO: close all TCP sessions */
|
||||||
autoip_start(netif);
|
autoip_restart(netif);
|
||||||
} else {
|
} else {
|
||||||
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
|
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
|
||||||
("autoip_handle_arp_conflict(): we are defend, send ARP Announce\n"));
|
("autoip_handle_arp_conflict(): we are defend, send ARP Announce\n"));
|
||||||
@ -179,7 +190,7 @@ autoip_handle_arp_conflict(struct netif *netif)
|
|||||||
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
|
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
|
||||||
("autoip_handle_arp_conflict(): we do not defend, retreating\n"));
|
("autoip_handle_arp_conflict(): we do not defend, retreating\n"));
|
||||||
/* TODO: close all TCP sessions */
|
/* TODO: close all TCP sessions */
|
||||||
autoip_start(netif);
|
autoip_restart(netif);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,7 +332,6 @@ autoip_start(struct netif *netif)
|
|||||||
}
|
}
|
||||||
|
|
||||||
autoip_create_addr(netif, &(autoip->llipaddr));
|
autoip_create_addr(netif, &(autoip->llipaddr));
|
||||||
autoip->tried_llipaddr++;
|
|
||||||
autoip_start_probing(netif);
|
autoip_start_probing(netif);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -511,7 +521,7 @@ autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr)
|
|||||||
!eth_addr_cmp(&netifaddr, &hdr->shwaddr))) {
|
!eth_addr_cmp(&netifaddr, &hdr->shwaddr))) {
|
||||||
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING,
|
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING,
|
||||||
("autoip_arp_reply(): Probe Conflict detected\n"));
|
("autoip_arp_reply(): Probe Conflict detected\n"));
|
||||||
autoip_start(netif);
|
autoip_restart(netif);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* RFC 3927 Section 2.5:
|
/* RFC 3927 Section 2.5:
|
||||||
|
Loading…
Reference in New Issue
Block a user