luci-base: remove interface from zone upon deletion
authorJo-Philipp Wich <jo@mein.io>
Mon, 6 May 2019 06:22:39 +0000 (08:22 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 6 May 2019 06:22:39 +0000 (08:22 +0200)
Fixes: #2690
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/model/network.lua

index 67a2de4ed2105a4854b024349c6ac4b1b2de1733..a36a23f321b25375cbb496c35133e6d65815b3d3 100644 (file)
@@ -622,6 +622,12 @@ function del_network(self, n)
                                        _uci:delete("wireless", s['.name'], "network")
                                end
                        end)
+
+               local ok, fw = pcall(require, "luci.model.firewall")
+               if ok then
+                       fw.init()
+                       fw:del_network(n)
+               end
        end
        return r
 end