2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 09:57:20 +00:00

- A core dump during expired lease cleanup has been repaired.

[ISC-Bugs #17187]
This commit is contained in:
David Hankins 2007-10-05 19:32:52 +00:00
parent 8eab95f2ee
commit 07b9a35108
2 changed files with 19 additions and 8 deletions

View File

@ -82,6 +82,8 @@ suggested fixes to <dhcp-users@isc.org>.
as directed in RFC3315 section 18.2.2 - that is, to all clients
regardless of the existence of bindings.
- A core dump during expired lease cleanup has been repaired.
Changes since 4.0.0a2
- Fix for startup where there are no IPv4 addresses on an interface.

View File

@ -959,6 +959,7 @@ static void
cleanup_old_expired(struct ipv6_pool *pool) {
struct iaaddr *tmp;
struct ia_na *ia_na;
char addr_buf[INET6_ADDRSTRLEN];
while (pool->num_inactive > 0) {
tmp = (struct iaaddr *)isc_heap_element(pool->inactive_timeouts,
@ -972,16 +973,24 @@ cleanup_old_expired(struct ipv6_pool *pool) {
pool->num_inactive--;
ia_na = NULL;
if (tmp->ia_na == NULL) {
inet_ntop(AF_INET6, &tmp->addr, addr_buf,
sizeof(addr_buf));
log_error("%s(%d): no IA_NA cleaning up address %s",
MDL, addr_buf);
} else {
ia_na_reference(&ia_na, tmp->ia_na, MDL);
ia_na_remove_iaaddr(ia_na, tmp, MDL);
iaaddr_dereference(&tmp, MDL);
if (ia_na->num_iaaddr <= 0) {
ia_na_hash_delete(ia_active,
(unsigned char*)ia_na->iaid_duid.data,
unsigned char *tmpd =
(unsigned char *)ia_na->iaid_duid.data;
ia_na_hash_delete(ia_active, tmpd,
ia_na->iaid_duid.len, MDL);
}
ia_na_dereference(&ia_na, MDL);
}
iaaddr_dereference(&tmp, MDL);
}
}
static void