summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/router.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/router.c b/src/router.c
index ffafb94..e8a9aa9 100644
--- a/src/router.c
+++ b/src/router.c
@@ -358,11 +358,8 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add
}
valid = TIME_LEFT(addr->valid, now);
- if (iface->ra_useleasetime) {
- if (valid > iface->dhcpv4_leasetime)
- valid = iface->dhcpv4_leasetime;
- } else if (!preferred && valid < 7200)
- valid = 0;
+ if (iface->ra_useleasetime && valid > iface->dhcpv4_leasetime)
+ valid = iface->dhcpv4_leasetime;
if (minvalid > valid)
minvalid = valid;