mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-22 18:07:25 +00:00
[master] Add code to help clean up soft leases
This commit is contained in:
parent
9668744baa
commit
ad80055f72
3
RELNOTES
3
RELNOTES
@ -174,6 +174,9 @@ by Eric Young (eay@cryptsoft.com).
|
||||
on an error condition.
|
||||
[ISC-Bugs #36194
|
||||
|
||||
- Add code to help clean up soft leases.
|
||||
[ISC-Bugs #36304]
|
||||
|
||||
Changes since 4.3.0rc1
|
||||
|
||||
- None
|
||||
|
@ -148,6 +148,29 @@ static struct iasubopt *prefix_compare(struct reply_state *reply,
|
||||
struct iasubopt *beta);
|
||||
static int find_hosts_by_duid_chaddr(struct host_decl **host,
|
||||
const struct data_string *client_id);
|
||||
static void schedule_lease_timeout_reply(struct reply_state *reply);
|
||||
|
||||
/*
|
||||
* Schedule lease timeouts for all of the iasubopts in the reply.
|
||||
* This is currently used to schedule timeouts for soft leases.
|
||||
*/
|
||||
|
||||
static void
|
||||
schedule_lease_timeout_reply(struct reply_state *reply) {
|
||||
struct iasubopt *tmp;
|
||||
int i;
|
||||
|
||||
/* sanity check the reply */
|
||||
if ((reply == NULL) || (reply->ia == NULL) || (reply->ia->iasubopt == NULL))
|
||||
return;
|
||||
|
||||
/* walk through the list, scheduling as we go */
|
||||
for (i = 0 ; i < reply->ia->num_iasubopt ; i++) {
|
||||
tmp = reply->ia->iasubopt[i];
|
||||
schedule_lease_timeout(tmp->ipv6_pool);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This function returns the time since DUID time start for the
|
||||
* given time_t value.
|
||||
@ -2052,6 +2075,8 @@ reply_process_ia_na(struct reply_state *reply, struct option_cache *ia) {
|
||||
ia_id->len, reply->ia, MDL);
|
||||
|
||||
write_ia(reply->ia);
|
||||
} else {
|
||||
schedule_lease_timeout_reply(reply);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@ -2770,6 +2795,8 @@ reply_process_ia_ta(struct reply_state *reply, struct option_cache *ia) {
|
||||
ia_id->len, reply->ia, MDL);
|
||||
|
||||
write_ia(reply->ia);
|
||||
} else {
|
||||
schedule_lease_timeout_reply(reply);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@ -3831,6 +3858,8 @@ reply_process_ia_pd(struct reply_state *reply, struct option_cache *ia) {
|
||||
ia_id->len, reply->ia, MDL);
|
||||
|
||||
write_ia(reply->ia);
|
||||
} else {
|
||||
schedule_lease_timeout_reply(reply);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
|
Loading…
x
Reference in New Issue
Block a user