On Mon, Sep 07, 2020 at 07:37:10PM +0200, Geert Stappers wrote: > I might understand the re-location of CONTEXT_SETLEASE > > I don't understand the change from '3 * param->adv_interval' > to '2 * param->adv_interval'. > > > And my actual message: the patch has been seen ...
How curious. Is there a vim keybinding to decrement a number that I might have hit by mistake? (searched, yes, it's ctrl-x: TIL) New one attached, thanks for the review! Cheers, -- Iain Lane [ i...@orangesquash.org.uk ] Debian Developer [ la...@debian.org ] Ubuntu Developer [ la...@ubuntu.com ]
From 91657a466cdf1d90d3afb64e47803e72cce5678b Mon Sep 17 00:00:00 2001 From: Iain Lane <i...@orangesquash.org.uk> Date: Mon, 7 Sep 2020 10:20:02 +0100 Subject: [PATCH] Make sure valid and preferred lifetimes always get set In 4d85e409cd2f4b0935d6ac5e8c72f6a151735d52 we skipped setting the floor time if we were using the default RA interval. The commit was a bit too broad; it also caused the valid and preferred lifetimes to be skipped too, meaning that they were set to infinite. Adjust the check, so that we only apply the "are we using the default?" check when calculating the floor; but still set up the `time` variable because that is used later on as a ceiling for valid_lft and preferred_lft. --- src/radv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/radv.c b/src/radv.c index 41df852..19d7954 100644 --- a/src/radv.c +++ b/src/radv.c @@ -629,11 +629,11 @@ static int add_prefixes(struct in6_addr *local, int prefix, /* 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) + if (time > context->lease_time) { time = context->lease_time; - if (time < ((unsigned int)(3 * param->adv_interval))) + if ((context->flags & CONTEXT_SETLEASE) && + time < ((unsigned int)(3 * param->adv_interval))) time = 3 * param->adv_interval; } -- 2.27.0
signature.asc
Description: PGP signature
_______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss