	end
end

for i, n in ipairs(ipc.neighbors({ family = 4 })) do
	if n.mac and n.dest then
		local c = clients[n.mac]
		if c and not c.ip then
			c.ip = n.dest:string()
		end
	end
end

local function showmac(mac)
	if not is_admin then
		mac = mac:gsub("(%S%S:%S%S):%S%S:%S%S:(%S%S:%S%S)", "%1:XX:XX:%2")
	end
	return mac
end

if luci.http.formvalue("status") == "1" then
	local rv = {}
	for _, c in utl.spairs(clients,
		function(a,b) if clients[a].policy == clients[b].policy then
			return (clients[a].start > cl