``easyrule`` CLI script has multiple bugs and undesirable behaviors
Plus Target Version:
While updating docs I noticed a few minor issues in the ``easyrule`` CLI script/backend code that need addressing:
- The protocol validation isn't functional, it's checking if the return value is
-1when it should be comparing to
false. Fixing that might break other things, though. Currently the validation only checks if it's a valid protocol name, and it should allow passing a protocol by number as well as a protocol of
- The special network list used to validate special src/dst addresses is incomplete, it's missing
(self)-- need to check if the
()might not pass through from CLI unless quoted, may need an alternate keyword or at least some help text to show it in quotes.
- Error messages always say "Host" for src/dst even when passing a network or other keyword, it should use a different term.
- Interface validation error can't print the invalid value as it's clobbered by a failed validation. It doesn't need to try printing the value anyhow
- Interface validation allows using the internal name (wan, lan, opt1) or the custom name (FIBER, LAN, DMZ) but it doesn't allow using the OS interface name for assigned interfaces. It should be possible to allow that as well.
- CLI usage/help text could mention some of the special keywords that can be used (e.g.
anyfor proto/src/dst/port) and maybe print a link to the docs.