mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Tweak strategy for confirming SLAAC addresses.
The code which conirms possible SLAAC addresses associated with hosts known from DHCPv4 addresses keeps trying at longer and longer intervals essentially forever, EXCEPT if sending an ICMP ping results in a HOSTUNREACH error, which terminates the process immediately. It turns out that this is too drastic. Routing changes associated with addressing changes can cause temporary HOSTUNREACH problems, even when an address has not gone forever. Therefore continue trying in the face of HOSTUNREACH for the first part of the process. HOSTUNREACH errors will still terminate the process after it reaches the slow tail of retries. Thanks to Andrey Vakhitov for help diagnosing this.
This commit is contained in:
@@ -166,7 +166,8 @@ time_t periodic_slaac(time_t now, struct dhcp_lease *leases)
|
||||
|
||||
if (sendto(daemon->icmp6fd, daemon->outpacket.iov_base, save_counter(-1), 0,
|
||||
(struct sockaddr *)&addr, sizeof(addr)) == -1 &&
|
||||
errno == EHOSTUNREACH)
|
||||
errno == EHOSTUNREACH &&
|
||||
slaac->backoff == 12)
|
||||
slaac->ping_time = 0; /* Give up */
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user