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

Disable metric settings

This commit is contained in:
Ycarus 2018-12-07 14:16:55 +01:00
parent edd2b0750c
commit 648fc5d31c

View file

@ -83,15 +83,14 @@ mtu.placeholder = "1500"
mtu.datatype = "max(9200)"
metric = section:taboption("advanced", Value, "metric",
translate("Use gateway metric"))
--metric = section:taboption("advanced", Value, "metric",
-- translate("Use gateway metric"))
--metric.default = "1"
--metric.datatype = "uinteger"
metric.default = "1"
metric.datatype = "uinteger"
local nw = require "luci.model.network".init()
for _, network in ipairs(nw:get_networks()) do
if network:proto() == "static" and network:type() == "macvlan" and tonumber(network:metric()) >= tonumber(metric.default) then
metric.default = network:metric() + 1
end
end
--local nw = require "luci.model.network".init()
--for _, network in ipairs(nw:get_networks()) do
-- if network:proto() == "static" and network:type() == "macvlan" and tonumber(network:metric()) >= tonumber(metric.default) then
-- metric.default = network:metric() + 1
-- end
--end