mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Simplify and fix RA lifetime calculation.
This commit is contained in:
15
src/dhcp6.c
15
src/dhcp6.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user