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.lede-project.org./?a=commitdiff_plain;h=4edcf383e0d00d97bb76030122f399e4571d43f3;p=project%2Fluci.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 (cherry picked from commit 972096bf39c932ad007fb431c81a2f5fab64649f) --- 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 e85b6bc6ea..b6f4aef3d0 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; },