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 67a2de4..a36a23f 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