When Duplicate Address Detection (DAD) fails for an IPv6 address, the address is marked as duplicated and remains unusable. In some cases, this is due to transient conditions, such as another host being slow to remove the address. To improve address recovery, this change introduces logic to periodically retry DAD for addresses in the duplicated state.
A new per-address counter and timestamp track the number and timing of DAD restarts. The maximum number of retries is configurable via the net.inet6.ip6.dad_restart sysctl (default: 10). Retries are attempted at a fixed interval (default: 30 seconds), and DAD is restarted only if the address remains duplicated and not detached.
This enhancement helps automatically recover IPv6 addresses that become available again, reducing the need for manual intervention in high-availability or failover environments.