CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2021/03/23 11:46:20
Modified files:
usr.sbin/dhcpleasectl: dhcpleasectl.c
Log message:
Use time_t for intermediate lease time values when calculating human
readable output for very long timeouts to prevent overflow.
While here add years and days.
Days might actually show up in normal leases. Years is to catch
"infinity" which is encoded as UINT32_MAX and used by vmd(8).
Previously we would overflow, wrap to negative which then got
transformed to 0s.
Pointed out by Dave Voutila while working on the vmd(8) dhcp code.