Skip to content
Commit 0f35de88 authored by Cody R. Brown's avatar Cody R. Brown Committed by Hannu Nyman
Browse files

luci-base: luci.tools.status: properly parse infinite dnsmasq leases



The expiry time in a dnsmasq lease file line may be 0 (i.e.
expiry date = 01/01/1970 00:00:00 GMT) to denote an infinite
lease time, so adjust the code to properly support that.

The expiry attribute of the lease object will be set to "false"
in case of an infinite lease. This is to mimic the odhcp code below.
If the expiry date is not equal to 0, then just do exactly what was
done before (return the os.diff of current time and ts).

Signed-off-by: default avatarCody R. Brown <dev@codybrown.ca>
parent 3b46d84f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment