Commit 22ee2371 authored by Shawn Routhier's avatar Shawn Routhier
Browse files

[v4_1_esv] Add code to help clean up soft leases

parent 902f67a3
......@@ -142,6 +142,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.1-ESV-R9rc1
- None
......
......@@ -141,6 +141,28 @@ static isc_result_t reply_process_send_prefix(struct reply_state *reply,
static struct iasubopt *prefix_compare(struct reply_state *reply,
struct iasubopt *alpha,
struct iasubopt *beta);
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
......@@ -1920,6 +1942,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:
......@@ -2607,6 +2631,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:
......@@ -3509,6 +3535,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:
......
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