Why is DHCPD offering wrong lease times?
I have DHCPD on OpenBSD 5.8 running and experiencing a weird issue.
I set the lease time as follows in /etc/dhcpd.conf:
max-lease-time 7200;
default-lease-time 7200;
This should be 2 hours.
When I check my dhcpd.leases file, I see this:
lease 172.24.186.224 {
starts 5 2018/07/31 07:17:03 UTC;
ends 5 2018/07/31 19:17:03 UTC;
hardware ethernet b4:f6:1c:27:4f:a4;
uid 01:b4:f6:1c:27:4f:a4;
client-hostname "Apple";
}
This 12-hour lease time also checks out when doing a tcpdump and analyzing with Wireshark. (There are also some 24-hour lease times in the dhcpd.leases file which I can not explain either.)
I tried to set the max-lease-time and default-lease-time either in the "toplevel" config or for a specific subnet with no luck.
What is going on here?
I just found the solution.
It seems to be a bug in this specific OpenBSD version: