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:
parent
edd2b0750c
commit
648fc5d31c
1 changed files with 10 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue