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:
Jo-Philipp Wich 2019-09-10 17:05:15 +02:00
parent 38f5f4b970
commit ff4c722a21
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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