mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
autoip: Choose next address after rate limit
AutoIP now selects a new address after rate limit timeout, AutoIP tries a new address by incrementing the tried_llipaddr counter in the ACD_DECLINE case of the callback. In lwIP pre-2.2.0, address conflict detection was handled within autoip.c, and the incrementing happened in autoip_restart() (line 150). When ACD was extracted into a separate module in 2.2.0, this increment was missing for the rate-limiting path. Without this change, devices continuously retry the same IP address after rate limiting, causing them to fail Bonjour Conformance Tests.
This commit is contained in:
parent
b1edb7780f
commit
e7ab7e0773
@ -223,9 +223,10 @@ autoip_conflict_callback(struct netif *netif, acd_callback_enum_t state)
|
||||
autoip_restart(netif);
|
||||
break;
|
||||
case ACD_DECLINE:
|
||||
/* "delete" conflicting address so a new one will be selected in
|
||||
* autoip_start() */
|
||||
/* "delete" conflicting address and increment tried addr so a new one
|
||||
* will be selected in autoip_start() */
|
||||
ip4_addr_set_any(&autoip->llipaddr);
|
||||
autoip->tried_llipaddr++;
|
||||
autoip_stop(netif);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user