lan: getting DHCPv6 leases fails with expire time -1
In case there is expired DHCPv6 lease with validity timestamp 'valid': -1
, fetching DHCPv6 leases fails on json schema constraint
"expires": {"type": "integer", "minimum": 0, "description": "timestamp format"}
See common.json.
This behavior was introduced in commit da70e524 (see line 206).
Previously we just returned 'expired': 0
regardless of actual valid
value from ubus call result, but now we are using actual value provided by ubus call.
We should do better checking of leasetime/valid
values and fallback to some safe value in case invalid values are set in dhcp config.
Reported here: https://forum.turris.cz/t/turris-os-6-1-0-is-now-released-for-turris-omnia-and-turris-mox/18435/27