diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-06-29 14:36:18 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-06-29 14:44:01 +0200 |
commit | 5fff08b0c940cdd1194b40c602980e73688f7be6 (patch) | |
tree | 9202b01a318091a93cd21e6f5421f4888b8b0dc9 /tests/shell | |
parent | ea0e0e08cd69dff9107454ef217bfbc0a18f15f6 (diff) |
cmd: incorrect error reporting when table declaration exists
This example ruleset is missing the chain declaration:
add table x
add set x y { typeof ip saddr ; }
add rule x y counter
After this patch, error reporting provides suggestions for the missing
chain:
# nft -f ruleset.nft
ruleset.nft:3:12-12: Error: No such file or directory; did you mean chain ‘INPUT’ in table ip ‘filter’?
add rule x y counter
^
Before this patch, it incorrectly refers to the table:
ruleset.nft:3:10-10: Error: No such file or directory; did you mean table ‘filter’ in family ip?
add rule x y counter
^
This patch invalidates the table that is found via fuzzy lookup if it
exists in the cache.
Fixes: 0276c2fee939 ("cmd: check for table mismatch first in error reporting")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell')
0 files changed, 0 insertions, 0 deletions