oreach("dhcp", "dnsmasq",
	function(s)
		if s.leasefile then leasefile = s.leasefile end
	end)


uci:foreach("luci_splash_leases", "lease",
	function(s)
		if s.start and s.mac then
			clients[s.mac:lower()] = {
				start   = tonumber(s.start),
				limit   = ( tonumber(s.start) + leasetime ),
				mac     = s.mac:upper(),
				ipaddr  = s.ipaddr,
				policy  = "normal",
				packets = 0,
				bytes   = 0,
			}
		end
	end)

for _, r in ipairs(ipt:find({table="nat", chain="luci_splash_leases"})) do
	if r.options a