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 <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2020-12-11 13:22:38 +01:00
parent c121a43804
commit 972096bf39

View file

@ -522,6 +522,9 @@ return baseclass.extend({
}
}, this));
if (cfgvalue == '*' || cfgvalue == 'any' || cfgvalue == 'all')
cfgvalue = 'all';
return cfgvalue;
},