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

    2.0 RC2 shows DHCP leases as expired before their expiration time occurs

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    4 Posts 2 Posters 2.6k 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.
    • G
      geckox
      last edited by

      It seems that the new RC2 (along with RC1) is showing my DHCP leases as expired, even though they were very recently issued and the current time is between the Start and End datetimes. I set the timezone correctly and the "Current Date/Time" on the dashboard shows the correct time.

      Any idea about why the leases are always expired? Bug or misconfiguration? This was never a problem on 1.2.3.

      I'm using a fresh install of 2.0RC1 i386 that was then upgraded to RC2 this morning.

      Thanks.
      -Brian
      DHCP-leases-rc2.PNG
      DHCP-leases-rc2.PNG_thumb

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        That is coming from the DHCP leases file ( /var/dhcpd/var/db/dhcpd.leases ), in this block of code:

        			case "binding":
        				switch($data[$f+2]) {
        					case "active":
        						$leases[$l]['act'] = "active";
        						break;
        					case "free":
        						$leases[$l]['act'] = "expired";
        						$leases[$l]['online'] = "offline";
        						break;
        					case "backup":
        						$leases[$l]['act'] = "reserved";
        						$leases[$l]['online'] = "offline";
        						break;
        				}
        
        

        If they show expired, that's because the DHCP lease in the file has "binding state free;" for that lease. You can double check that to be sure.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          Looks like our update to dhcpd 4.2 may have adjusted the format of the file somewhat.

          Before it was:

            binding state active;
            next binding state free;
          
          

          And now it is:

            binding state active;
            next binding state free;
            rewind binding state free;
          

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            I just committed a fix:
            https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/dc073abdfdf04ccff94077d33b174c061e1f73df

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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