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:
parent
b2154e0b63
commit
854a5f68bb
1 changed files with 6 additions and 5 deletions
|
@ -137,13 +137,14 @@ o:value("2", translate("Allow all except listed"))
|
||||||
o.default = 0
|
o.default = 0
|
||||||
o.rmempty = false
|
o.rmempty = false
|
||||||
|
|
||||||
a = luci.sys.net.arptable() or {}
|
|
||||||
|
|
||||||
o = s:taboption("lan_ac", DynamicList, "lan_ac_ip", translate("LAN IP List"))
|
o = s:taboption("lan_ac", DynamicList, "lan_ac_ip", translate("LAN IP List"))
|
||||||
o.datatype = "ipaddr"
|
o.datatype = "ipaddr"
|
||||||
for i,v in ipairs(a) do
|
|
||||||
o:value(v["IP address"])
|
luci.ip.neighbors({ family = 4 }, function(entry)
|
||||||
end
|
if entry.reachable then
|
||||||
|
o:value(entry.dest:string())
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
s:tab("wan_ac", translate("WAN"))
|
s:tab("wan_ac", translate("WAN"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue