DHCP Lease ends on "tstp never" then changes to "1969/12/31 07:00:00PM"
Jeremy11one last edited by
Earlier, when I went to the DHCP Leases page, I noticed a network Switch had a DHCP lease that ended on "tstp never." When I came back to that page after checking the box "Change DHCP display lease time from UTC to local time", that cell changed to "1969/12/31 07:00:00PM". I'm guessing this is a bug?
192.168.1.101 (MAC here) PowerConnect 2014/10/13 13:12:22 tstp never online active
192.168.1.101 (MAC here) PowerConnect 2014/10/13 09:12:22AM 1969/12/31 07:00:00PM online active
As a bonus, can someone explain what "tstp never" is intended for? I'm wondering if there's ever a good reason for a dynamic lease to last forever.
phil.davis last edited by
"Some string of text" will equal time 0. Then I guess you are 5 hours behind UTC. The zero time in FreeBSD is 1 Jan 1970. So it takes off 5 hours and you get that time.
"tstp" is documented in FreeBSD man pages here: https://www.freebsd.org/cgi/man.cgi?query=dhcpd.leases&sektion=5&apropos=0&manpath=FreeBSD+9.2-RELEASE+and+Ports
I guess the code that parses the DHCP leases file is not handling every possible bit of text that might be in that file, and in this case is displaying those words where it expected to have valid time-stamps.
cmb last edited by
Where it ends up showing "tstp never" is where you have BOOTP leases, it mis-parses them (because BOOTP leases have no end, and are output differently in the leases file). It should just show "never" whether viewing in UTC or local time.