diff options
author | Manuel Munz <freifunk@somakoma.de> | 2012-11-10 17:38:37 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2012-11-10 17:38:37 +0000 |
commit | 4e04e353fe91107d27046f93d63aa9aa92418ce8 (patch) | |
tree | b69c61493218cc3e950d4c0656a0b357fc5aefcc /modules | |
parent | 36f88887c19d2b0098ae1965b6725845705efc51 (diff) |
admin-full/network/hosts: Fix problem when arptable is empty, #482
Diffstat (limited to 'modules')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua b/modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua index c791a57d0..b4fee8cf0 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/hosts.lua @@ -30,7 +30,8 @@ ip = s:option(Value, "ip", translate("IP address")) ip.datatype = "ipaddr" ip.rmempty = true -for i, dataset in ipairs(luci.sys.net.arptable()) do +local arptable = luci.sys.net.arptable() or {} +for i, dataset in ipairs(arptable) do ip:value( dataset["IP address"], "%s (%s)" %{ dataset["IP address"], dataset["HW address"] } |