]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: check if table and chain exists when adding rules
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 18 Oct 2015 18:18:05 +0000 (20:18 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 18 Oct 2015 18:56:29 +0000 (20:56 +0200)
commit97493717e7383ee99527053b60d610fa9f94a886
treeb5bd0366be49075390d1e23265ccf0e940bb918d
parent34689c201f03102861ff2e23ccd097a02663c5de
evaluate: check if table and chain exists when adding rules

Assuming a table 'test' that contains a chain 'test':

 # nft add rule test1 test2 counter
 <cmdline>:1:1-28: Error: Could not process rule: Table 'test1' does not exist
 add rule test1 test2 counter
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 # nft add rule test test2 counter
 <cmdline>:1:1-27: Error: Could not process rule: Chain 'test2' does not exist
 add rule test test2 counter
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c