From: Florian Eckert Date: Fri, 11 Dec 2020 12:22:38 +0000 (+0100) Subject: luci-app-firewall: map proto '*' and 'any' to all on rule config X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=972096bf39c932ad007fb431c81a2f5fab64649f;p=openwrt-luci.git luci-app-firewall: map proto '*' and 'any' to all on rule config Before the change, the options '*' and 'any' in the drop down were not recognized as valid options, when loaded from the uci. With this change, the options '*' and 'any' are mapped to 'all' and saved as such. This change is especially important if the proto option is changed manually to '*' or 'any' in shell and then further configured via LuCI. Signed-off-by: Florian Eckert --- diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js b/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js index 32998c2ff8..d365467835 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js @@ -522,6 +522,9 @@ return baseclass.extend({ } }, this)); + if (cfgvalue == '*' || cfgvalue == 'any' || cfgvalue == 'all') + cfgvalue = 'all'; + return cfgvalue; },