Merge pull request #3063 from TDT-AG/pr/20190908-luci-app-statistics
[oweals/luci.git] / modules / luci-base / luasrc / model / network.lua
index dec25a5d0b8a3f72bd07187c0a0fef2604e19fa4..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
@@ -1160,13 +1166,7 @@ function protocol.is_dynamic(self)
 end
 
 function protocol.is_auto(self)
-       local auto = self:_get("auto")
-
-       if auto == "0" then
-               return false
-       else
-               return true
-       end
+       return (self:_get("auto") ~= "0")
 end
 
 function protocol.is_alias(self)