luci-app-shadowsocks-libev: eliminate use of luci.sys.net.arptable()

Translate the use of luci.sys.net.arptable() to luci.ip.neighbors() to allow
dropping the former function from base LuCI later on.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2017-07-10 16:16:35 +02:00
parent b2154e0b63
commit 854a5f68bb

View file

@ -137,13 +137,14 @@ o:value("2", translate("Allow all except listed"))
o.default = 0
o.rmempty = false
a = luci.sys.net.arptable() or {}
o = s:taboption("lan_ac", DynamicList, "lan_ac_ip", translate("LAN IP List"))
o.datatype = "ipaddr"
for i,v in ipairs(a) do
o:value(v["IP address"])
end
luci.ip.neighbors({ family = 4 }, function(entry)
if entry.reachable then
o:value(entry.dest:string())
end
end)
s:tab("wan_ac", translate("WAN"))