So the default lease time is one day, even for statically mapped IP addresses. I understand now why my Wifi AP complains once a day that is was disconnected :)
The ugly solution is to enter a ridiculously high value (2^31 comes to mind, since I don't know whether the value is stored signed or unsigned). As an engineer, this solution is not very satisfying. Is there a default "disable maximum lease time" option?
https://lazyadmin.nl/home-network/dhcp-lease-time/
Interesting. Since I upped the maximum lease time, I no longer my Wifi AP's "device has been disconnected" error once every 24 hours.
Seems like not every device knows it needs to renew the lease...
I've seen this once with a certain Cisco switch. It never renewed its DHCP lease. After the lease expired, the switch was left without an IP address and the management interface became unreachable.
Workaround: One year lease time. ;D
Regarding infinite leases: Setting default-lease-time / max-lease-time in the dhcpd.conf to -1 should have this effect. But I'm not sure whether the OPNsense UI allows this.
The maximum setting that fits into a 32bit signed int is more than 60 years. That should do. I also only set this to specific static leases where I encounter these problems.