luci-base, luci-mod-network: fix bridge state change quirks
Fixes: #2997
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fe0e4f8b4d
)
This commit is contained in:
parent
38f5f4b970
commit
ff4c722a21
2 changed files with 3 additions and 3 deletions
|
@ -1238,8 +1238,8 @@ function protocol.get_interface(self)
|
|||
end
|
||||
end
|
||||
|
||||
function protocol.get_interfaces(self)
|
||||
if self:is_bridge() or (self:is_virtual() and not self:is_floating()) then
|
||||
function protocol.get_interfaces(self, ignore_bridge_state)
|
||||
if ignore_bridge_state or self:is_bridge() or (self:is_virtual() and not self:is_floating()) then
|
||||
local ifaces = { }
|
||||
|
||||
local ifn
|
||||
|
|
|
@ -305,7 +305,7 @@ if not net:is_floating() then
|
|||
if alias then
|
||||
old_ifs[1] = '@' .. alias
|
||||
else
|
||||
for _, i in ipairs(net:get_interfaces() or { net:get_interface() }) do
|
||||
for _, i in ipairs(net:get_interfaces(true) or { net:get_interface() }) do
|
||||
old_ifs[#old_ifs+1] = i:name()
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue