]> git.ipfire.org Git - thirdparty/nftables.git/commit
cmd: incorrect table location in error reporting
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 29 Jun 2021 12:23:10 +0000 (14:23 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 29 Jun 2021 12:39:01 +0000 (14:39 +0200)
commitea0e0e08cd69dff9107454ef217bfbc0a18f15f6
treefbe3e371beb37d1c77bb10ea86690d09e0173697
parentd70cf33fdce309b81bba623d65aafbc2658e0c9a
cmd: incorrect table location in error reporting

If the command refers to an inexisting table, then use the table location.

ruleset.nft:3:12-12: Error: No such file or directory; did you mean table ‘filter’ in family ip?
add rule x x ip saddr @x log prefix "Anti SSH-Bruteforce: " drop
         ^

before this patch location is not correct:

ruleset.nft:3:12-12: Error: No such file or directory; did you mean table ‘filter’ in family ip?
add rule x x ip saddr @x log prefix "Anti SSH-Bruteforce: " drop
           ^

Fixes: 0276c2fee939 ("cmd: check for table mismatch first in error reporting")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/cmd.c