2.0 RC2 shows DHCP leases as expired before their expiration time occurs
-
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
-
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.
-
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;
-
I just committed a fix:
https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/dc073abdfdf04ccff94077d33b174c061e1f73df