<div dir="ltr"><div class="gmail_default" style="font-size:small">Thanks Simon,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">"infinite" seems to be working fine - I guess something with the year 2038 (?) as it seems that 36250days x 86400sec = ‭3.132.000.000 ‬which is less than 2^32 (4.294.967.296).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'll see into incorporating the "infinite" stuff in the code.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Best,</div><div class="gmail_default" style="font-size:small">Andrija</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 20 Feb 2020 at 15:35, Simon Kelley <<a href="mailto:simon@thekelleys.org.uk">simon@thekelleys.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 20/02/2020 10:49, Andrija Panic wrote:<br>
> Hi all,<br>
> <br>
> first time posting to this ML.<br>
> <br>
> We are using dnsmasq with CloudStack to provide DNS/DHCP services.<br>
> <br>
> Recently we've changed the lease duration to 36250 days (98y, i.e.<br>
> closer to infinity) to make sure that the clients will not renew its<br>
> lease for a loooong time (for reasons known to us).<br>
> <br>
> Now, the lease time is sent fine to the client, but the<br>
> dhcp-renewal-time and dhcp-rebinding-time are NOT set to 50% (87.5%) of<br>
> the lease time, but instead to "only" ~650 days, which beats the purpose<br>
> of us increasing it to 36250 days.<br>
> <br>
> Can anyone advise what is happening and if this might be a known issue?<br>
> <br>
> Here's an example from the log (dnsmasq version 2.76 on Debian 9)<br>
> <br>
> root@r-3199-VM:~# cat /var/log/dnsmasq.log<br>
> <br>
> |:|<br>
> |Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 51<br>
> lease-time 36250d|<br>
> |Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 58<br>
> T1 649d19h57m19s|<br>
> <br>
> Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 59<br>
> T2 649d19h57m20s<br>
> <br>
> <br>
> Thanks,<br>
> <br>
> -- <br>
> <br>
> Andrija Panić<br>
> <br>
<br>
These times are 32-bit values, expressed in seconds, so I suspect that<br>
your 98 years has overflowed the variable. Either that or the<br>
end-of-lease time is after 2038, and you're running on a platform with<br>
32bt time_t, and have overflowed that.<br>
<br>
Instead of messing with very long lease times, why not just set the<br>
lease time to "infinite", which should solve these problems.<br>
<br>
Simon.<br>
<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><br><div>Andrija Panić</div></div></div></div></div>