Commit 9f48ffa1 authored by Simon Kelley's avatar Simon Kelley

Apply ceiling of configured dhcp-range leasetime to deprecated prefix adverts.

parent 871d4562
...@@ -625,6 +625,10 @@ void dhcp_construct_contexts(time_t now) ...@@ -625,6 +625,10 @@ void dhcp_construct_contexts(time_t now)
/* previously constructed context has gone. advertise it's demise */ /* previously constructed context has gone. advertise it's demise */
context->flags |= CONTEXT_OLD; context->flags |= CONTEXT_OLD;
context->address_lost_time = now; context->address_lost_time = now;
/* Apply same ceiling of configured lease time as in radv.c */
if (context->saved_valid > context->lease_time)
context->saved_valid = context->lease_time;
/* maximum time is 2 hours, from RFC */
if (context->saved_valid > 7200) /* 2 hours */ if (context->saved_valid > 7200) /* 2 hours */
context->saved_valid = 7200; context->saved_valid = 7200;
ra_start_unsolicted(now, context); ra_start_unsolicted(now, context);
......
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