On 20/02/2020 10:49, Andrija Panic wrote:
> Hi all,
> 
> first time posting to this ML.
> 
> We are using dnsmasq with CloudStack to provide DNS/DHCP services.
> 
> Recently we've changed the lease duration to 36250 days (98y, i.e.
> closer to infinity) to make sure that the clients will not renew its
> lease for a loooong time (for reasons known to us).
> 
> Now, the lease time is sent fine to the client, but the
> dhcp-renewal-time and dhcp-rebinding-time are NOT set to 50% (87.5%) of
> the lease time, but instead to "only" ~650 days, which beats the purpose
> of us increasing it to 36250 days.
> 
> Can anyone advise what is happening and if this might be a known issue?
> 
> Here's an example from the log (dnsmasq version 2.76 on Debian 9)
> 
> root@r-3199-VM:~# cat /var/log/dnsmasq.log
> 
> |:|
> |Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 51
> lease-time 36250d|
> |Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 58
> T1 649d19h57m19s|
> 
> Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 59
> T2 649d19h57m20s
> 
> 
> Thanks,
> 
> -- 
> 
> Andrija Panić
> 

These times are 32-bit values, expressed in seconds, so I suspect that
your 98 years has overflowed the variable. Either that or the
end-of-lease time is after 2038, and you're running on a platform with
32bt time_t, and have overflowed that.

Instead of messing with very long lease times, why not just set the
lease time to "infinite", which should solve these problems.

Simon.


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to