applications/luci-ffwizard-leipzig: prepare advanced firewall config and disable...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Jan 2009 16:46:28 +0000 (16:46 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Jan 2009 16:46:28 +0000 (16:46 +0000)
applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua

index 827bc14b7f86f95ab7e5f0d50f55abfbf0b7d64e..6373c7a8075f2d9010ecff568c65b4ad102db38c 100644 (file)
@@ -209,6 +209,16 @@ function main.write(self, section, value)
                        uci:set("firewall", section[".name"], "drop_invalid", "0")
                end)
 
+       -- Prepare advanced config
+       local has_advanced = false
+       uci:foreach("firewall", "advanced",
+               function(section) has_advanced = true end)
+
+       if not has_advanced then
+               uci:section("firewall", "advanced", nil,
+                       { tcp_ecn = "0" })
+       end
+
        uci:save("firewall")