]> git.ipfire.org Git - thirdparty/nftables.git/commit
main: propagate error to shell
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 22 Jul 2014 23:07:34 +0000 (01:07 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 25 Jul 2014 01:41:17 +0000 (03:41 +0200)
commitfd3479639d0a43399a15995add9d4abbcf40f22c
treed3ff024815483158e9f2d96c76735b92252c5686
parentb1a348208a9e5749860a95ceb0307fc16f2edb7f
main: propagate error to shell

Before:

 # nft add rule ip test input ip hdrlength 3
 <cmdline>:1:1-37: Error: Could not process rule: Invalid argument
 add rule ip test input ip hdrlength 3
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 # echo $?
 0

After:

 # nft add rule ip test input ip hdrlength 3
 <cmdline>:1:1-37: Error: Could not process rule: Invalid argument
 add rule ip test input ip hdrlength 3
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 # echo $?
 1

Reported-by: Ana Rey Botello <anarey@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/main.c