From 9f48ffa1e82e7329b6c1f0299e834713969489dc Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Sun, 28 Jul 2013 15:47:04 +0100 Subject: [PATCH] Apply ceiling of configured dhcp-range leasetime to deprecated prefix adverts. --- src/dhcp6.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dhcp6.c b/src/dhcp6.c index 19e3cde..17e03e5 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -625,6 +625,10 @@ void dhcp_construct_contexts(time_t now) /* previously constructed context has gone. advertise it's demise */ context->flags |= CONTEXT_OLD; 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 */ context->saved_valid = 7200; ra_start_unsolicted(now, context);