[Dnsmasq-discuss] [PATCH] Re: RA-acquired address not marked as 'dynamic' with 2.82

Dominik dl6er at dl6er.de
Mon Sep 7 20:51:21 BST 2020


Hey Iain,

On 07.09.20 13:22, Iain Lane wrote:
> The lifetimes are *forever* now, but the intention of that commit is 
> that they were supposed to be one day (86400 seconds). I think maybe the 
> intention of the commit was this (attached)?

Yes, that's the problem here. The variable time is initialized to
0xffffffff A.K.A. Infinity.

Before this patch, the if kicked in because (time > context->lease_time)
was clearly true with time being Infinity. As result the lease time was
reduced. The mentioned patch added the new condition (context->flags &
CONTEXT_SETLEASE) on top. As this evaluates to false when no explicit
lease time was set by the user, dnsmasq keeps Infinity and doesn't limit
anything while it should.

I attach a simple patch for this bug. It would be awesome if you could
try if this solves the problem. The idea is to fix the logic so that the
lease time is always set when the user explicitly wants to do this and
otherwise only limited when it is too large.

Best,
Dominik

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-use-Infinity-when-no-lease-time-was-explicitly.patch
Type: text/x-patch
Size: 1065 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20200907/2a73497a/attachment.bin>


More information about the Dnsmasq-discuss mailing list