Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/luci.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-07-05 01:51:59 +0300
committerJo-Philipp Wich <jo@mein.io>2020-07-05 01:51:59 +0300
commit0abcb39b623f0eff0fbcdfb99fca8f3224701e86 (patch)
tree5e66e761a1efd658a5f8cd480d84236d8a7aee3a /applications/luci-app-firewall/htdocs
parent367d7b66714bd294a9e87bc6de211ab273015da6 (diff)
luci-app-firewall: migrate syn_flood option to synflood_protect on save
Fixes: #4220 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-firewall/htdocs')
-rw-r--r--applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
index 85e20a23c7..b24521e1ee 100644
--- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
+++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
@@ -41,7 +41,20 @@ return view.extend({
s.anonymous = true;
s.addremove = false;
- o = s.option(form.Flag, 'syn_flood', _('Enable SYN-flood protection'));
+ o = s.option(form.Flag, 'synflood_protect', _('Enable SYN-flood protection'));
+ o.cfgvalue = function(section_id) {
+ var val = uci.get('firewall', section_id, 'synflood_protect');
+ return (val != null) ? val : uci.get('firewall', section_id, 'syn_flood');
+ };
+ o.write = function(section_id, value) {
+ uci.unset('firewall', section_id, 'syn_flood');
+ uci.set('firewall', section_id, 'synflood_protect', value);
+ };
+ o.remove = function(section_id) {
+ uci.unset('firewall', section_id, 'syn_flood');
+ uci.unset('firewall', section_id, 'synflood_protect');
+ };
+
o = s.option(form.Flag, 'drop_invalid', _('Drop invalid packets'));
var p = [