Commit 7f61b3ad authored by Simon Kelley's avatar Simon Kelley

Small SLAAC optimisation.

parent a9ab732e
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment