summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2013-11-11 20:12:40 +0000
committerManuel Munz <freifunk@somakoma.de>2013-11-11 20:12:40 +0000
commite97596f42d5376a10c6a2aebfe8752c687c9e290 (patch)
treec79e0e84eb2f2d925d34c64157a3630d2544f643 /applications/luci-splash
parent785211a974ffb2e8e9ed75bc46adfd55d00ab2c0 (diff)
applications/luci-splash: fix another crash in luci-splash when there were empty whitelist/blacklist sections
Diffstat (limited to 'applications/luci-splash')
-rwxr-xr-xapplications/luci-splash/root/usr/sbin/luci-splash23
1 files changed, 15 insertions, 8 deletions
diff --git a/applications/luci-splash/root/usr/sbin/luci-splash b/applications/luci-splash/root/usr/sbin/luci-splash
index 25a12f6a4..6b1e41edb 100755
--- a/applications/luci-splash/root/usr/sbin/luci-splash
+++ b/applications/luci-splash/root/usr/sbin/luci-splash
@@ -291,21 +291,28 @@ function get_known_macs(list)
local leased_macs = { }
if not list or list == "lease" then
-
- uci:foreach("luci_splash_leases", "lease",
- function(s) leased_macs[s.mac:lower()] = true end)
+ uci:foreach("luci_splash_leases", "lease", function(s)
+ if s.mac then
+ leased_macs[s.mac:lower()] = true
+ end
+ end)
end
if not list or list == "whitelist" then
- uci:foreach("luci_splash", "whitelist",
- function(s) leased_macs[s.mac:lower()] = true end)
+ uci:foreach("luci_splash", "whitelist", function(s)
+ if s.mac then
+ leased_macs[s.mac:lower()] = true
+ end
+ end)
end
if not list or list == "blacklist" then
- uci:foreach("luci_splash", "blacklist",
- function(s) leased_macs[s.mac:lower()] = true end)
+ uci:foreach("luci_splash", "blacklist", function(s)
+ if s.mac then
+ leased_macs[s.mac:lower()] = true
+ end
+ end)
end
-
return leased_macs
end