1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix interface name and add multiple server support to omr-bypass

This commit is contained in:
Ycarus 2018-12-12 21:31:32 +01:00
parent edff787f63
commit cad1cb5a06
2 changed files with 11 additions and 4 deletions

View file

@ -1,6 +1,5 @@
local net = require "luci.model.network".init()
local sys = require "luci.sys"
local ifaces = sys.net:devices()
local m, s, o
m = Map("omr-tracker", translate("OMR-Tracker"))
@ -86,9 +85,9 @@ s.template_addremove = "omr-tracker/cbi-select-add"
s.addremove = true
s.add_select_options = { }
s.add_select_options[''] = ''
for _, iface in ipairs(ifaces) do
if not (iface == "lo" or iface:match("^ifb.*")) then
s.add_select_options[iface] = iface
for _, iface in ipairs(net:get_networks()) do
if not (iface:name() == "loopback") then
s.add_select_options[iface:name()] = iface:name()
end
end