Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DHCP Lease ends on "tstp never" then changes to "1969/12/31 07:00:00PM"

    Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
    3 Posts 3 Posters 2.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      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?

      UTC Time:
      192.168.1.101 (MAC here) PowerConnect 2014/10/13 13:12:22 tstp never online active

      Local Time:
      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.

      1 Reply Last reply Reply Quote 0
      • P
        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.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • C
          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.

          https://redmine.pfsense.org/issues/3945

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.