mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-22 11:46:09 +00:00
Small SLAAC optimisation.
This commit is contained in:
1 parent
a9ab732e35
commit
7f61b3ad59
1 file changed
+5
-1
+5
-1
@@ -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