Simplify and fix RA lifetime calculation.

This commit is contained in:
Simon Kelley
2012-12-21 16:23:26 +00:00
parent bad7b875eb
commit ed8b68ad06
3 changed files with 15 additions and 36 deletions

View File

@@ -488,6 +488,8 @@ static int construct_worker(struct in6_addr *local, int prefix,
(void)scope;
(void)flags;
(void)valid;
(void)preferred;
struct cparam *param = vparam;
@@ -549,19 +551,6 @@ static int construct_worker(struct in6_addr *local, int prefix,
log_context(AF_INET6, context);
}
if (context)
{
if (valid == -1)
context->valid = valid;
else
context->valid = valid + param->now;
if (preferred == -1)
context->preferred = preferred;
else
context->preferred = preferred + param->now;
}
}
return 1;