From 4edcf383e0d00d97bb76030122f399e4571d43f3 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 11 Dec 2020 13:22:38 +0100 Subject: [PATCH] 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) --- .../htdocs/luci-static/resources/tools/firewall.js | 3 +++ 1 file changed, 3 insertions(+) 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; }, -- 2.30.2