diff options
-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"] } |