splash: fix exception when listing whitelist entries

Fixes ticket #123.
This commit is contained in:
Benoît Knecht 2010-04-13 07:29:58 +00:00
parent c8d6a460bd
commit 4cf6abae1a

View file

@ -426,11 +426,11 @@ function list()
) do ) do
if (s[".type"] == "whitelist" or s[".type"] == "blacklist") and s.mac then if (s[".type"] == "whitelist" or s[".type"] == "blacklist") and s.mac then
local mac = s.mac:lower() local mac = s.mac:lower()
local arp = arpcache[mac]:lower() local arp = arpcache[mac]
print(string.format( print(string.format(
"%-17s %-15s %-9s %4s %-7s %9s %9s", "%-17s %-15s %-9s %4s %-7s %9s %9s",
mac, arp and arp[2] or "?", s[".type"], "- ", mac, arp and arp[2]:lower() or "?", s[".type"],
arp and arp[1] or "?", "-", "-" "- ", arp and arp[1]:lower() or "?", "-", "-"
)) ))
end end
end end