diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-05-31 16:21:04 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-12-30 23:50:31 +0100 |
commit | f041efe3c26e3059df1ac8f1775f77423d4be5f6 (patch) | |
tree | 1f68e55846ddcaa198b14e69088e1144d116f9fa /iptables/xtables-restore.c | |
parent | 55bca4aa60c0027a39e635b2f05274058a2dcf2f (diff) |
xtables-restore: output the same error message that iptables-restore uses
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-restore.c')
-rw-r--r-- | iptables/xtables-restore.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c index 3b14a9f7..4f196fc6 100644 --- a/iptables/xtables-restore.c +++ b/iptables/xtables-restore.c @@ -266,22 +266,11 @@ xtables_restore_main(int argc, char *argv[]) * global commit at once, stick by now to * the existing behaviour. */ - if (nft_commit(&h)) { - fprintf(stderr, "Failed to commit " - "table %s\n", - curtable); - } DEBUGP("Calling commit\n"); - ret = 1; + ret = nft_commit(&h); } else { - if (nft_abort(&h)) { - xtables_error(OTHER_PROBLEM, - "Failed to abort " - "commit in table %s\n", - curtable); - } DEBUGP("Not calling commit, testing\n"); - ret = 1; + ret = nft_abort(&h); } in_table = 0; |