When a section contains unknown options, the parse_options function will
return false, and based on that the entire section might be skipped.
For example, rules containing a _name option will be skipped. As this
option used to be added by LuCI in the past, we should not skip those
rules, as it might break existing configs for many users.
Add a new DEPRECATED flag to handle such options.
Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
let NO_INVERT = 0x04;
let UNSUPPORTED = 0x08;
let REQUIRED = 0x10;
+let DEPRECATED = 0x20;
let ipv4_icmptypes = {
"any": [ 0xFF, 0, 0xFF ],
}
if (res != null) {
- if (flags & UNSUPPORTED)
+ if (flags & DEPRECATED)
+ this.warn_section(s, "option '" + key + "' is deprecated by fw4");
+ else if (flags & UNSUPPORTED)
this.warn_section(s, "option '" + key + "' is not supported by fw4");
else
rv[key] = res;