modules/admin-full: only remove network if zones actually change
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 8 Oct 2009 00:48:02 +0000 (00:48 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 8 Oct 2009 00:48:02 +0000 (00:48 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua

index 37fab9f..db4d500 100644 (file)
@@ -109,9 +109,6 @@ function fwzone.cfgvalue(self, section)
 end
 
 function fwzone.write(self, section, value)
 end
 
 function fwzone.write(self, section, value)
-
-       fw.del_network(section)
-
        local zone = fw.get_zone(value)
 
        if not zone then
        local zone = fw.get_zone(value)
 
        if not zone then
@@ -122,6 +119,7 @@ function fwzone.write(self, section, value)
        end
 
        if zone then
        end
 
        if zone then
+               fw.del_network(section)
                zone:add_network(section)
        end
 end
                zone:add_network(section)
        end
 end