Fixed bug #49610: Sometimes, autoIP fails to reuse the same address

Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
Roberto Barbieri Carrera 2016-11-16 12:24:57 +01:00 committed by goldsimon
parent 6dc3a2108a
commit 81a32e9b06

View File

@ -482,7 +482,8 @@ autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr)
* ip.dst == llipaddr && hw.src != own hwaddr
*/
if ((ip4_addr_cmp(&sipaddr, &autoip->llipaddr)) ||
(ip4_addr_cmp(&dipaddr, &autoip->llipaddr) &&
(ip4_addr_isany_val(sipaddr) &&
ip4_addr_cmp(&dipaddr, &autoip->llipaddr) &&
!eth_addr_cmp(&netifaddr, &hdr->shwaddr))) {
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING,
("autoip_arp_reply(): Probe Conflict detected\n"));