Change default lease time for DHCPv6 to one day.

Also remove floor on valid and preffered times in RA when
no time is specified.
This commit is contained in:
Simon Kelley
2020-07-12 22:45:46 +01:00
parent 2bd02d2f59
commit 4d85e409cd
6 changed files with 25 additions and 6 deletions

View File

@@ -626,8 +626,11 @@ static int add_prefixes(struct in6_addr *local, int prefix,
real_prefix = context->prefix;
}
/* find floor time, don't reduce below 3 * RA interval. */
if (time > context->lease_time)
/* find floor time, don't reduce below 3 * RA interval.
If the lease time has been left as default, don't
use that as a floor. */
if ((context->flags & CONTEXT_SETLEASE) &&
time > context->lease_time)
{
time = context->lease_time;
if (time < ((unsigned int)(3 * param->adv_interval)))