mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Small SLAAC optimisation.
This commit is contained in:
@@ -27,6 +27,7 @@ void slaac_add_addrs(struct dhcp_lease *lease, time_t now, int force)
|
||||
{
|
||||
struct slaac_address *slaac, *old, **up;
|
||||
struct dhcp_context *context;
|
||||
int dns_dirty = 0;
|
||||
|
||||
if (!(lease->flags & LEASE_HAVE_HWADDR) ||
|
||||
(lease->flags & (LEASE_TA | LEASE_NA)) ||
|
||||
@@ -78,7 +79,7 @@ void slaac_add_addrs(struct dhcp_lease *lease, time_t now, int force)
|
||||
{
|
||||
slaac->ping_time = now;
|
||||
slaac->backoff = 1;
|
||||
lease_update_dns(1);
|
||||
dns_dirty = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -103,6 +104,9 @@ void slaac_add_addrs(struct dhcp_lease *lease, time_t now, int force)
|
||||
}
|
||||
}
|
||||
|
||||
if (old || dns_dirty)
|
||||
lease_update_dns(1);
|
||||
|
||||
/* Free any no reused */
|
||||
for (; old; old = slaac)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user