reconfirm SLAAC addresses when DHCPv4 leases go though INIT_REBOOT state.

This commit is contained in:
Simon Kelley committed 2012-04-29 16:01:28 +01:00
1 parent 11263a462c
commit a9ab732e35
5 files changed
+23 -12

No files matched your search

+9 -1
View File
@@ -23,12 +23,13 @@
static int map_rebuild = 0;
static int ping_id = 0;
void slaac_add_addrs(struct dhcp_lease *lease, time_t now)
void slaac_add_addrs(struct dhcp_lease *lease, time_t now, int force)
{
struct slaac_address *slaac, *old, **up;
struct dhcp_context *context;
if (!(lease->flags & LEASE_HAVE_HWADDR) ||
(lease->flags & (LEASE_TA | LEASE_NA)) ||
lease->last_interface == 0 ||
!lease->hostname)
return ;
@@ -72,6 +73,13 @@ void slaac_add_addrs(struct dhcp_lease *lease, time_t now)
if (IN6_ARE_ADDR_EQUAL(&addr, &slaac->addr))
{
*up = slaac->next;
/* recheck when DHCPv4 goes through init-reboot */
if (force)
{
slaac->ping_time = now;
slaac->backoff = 1;
lease_update_dns(1);
}
break;
}
up = &slaac->next;