diff mbox

[xtables-compat,3/4] arptables-compat: fix missing error reporting

Message ID 1412799471-7721-3-git-send-email-pablo@netfilter.org
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Pablo Neira Ayuso Oct. 8, 2014, 8:17 p.m. UTC
# arptables-compat -D INPUT -j ACCEPT
 arptables: Bad rule (does a matching rule exist in that chain?)

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 iptables/xtables-arp-standalone.c |    5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/iptables/xtables-arp-standalone.c b/iptables/xtables-arp-standalone.c
index 23b6bcb..182dd9f 100644
--- a/iptables/xtables-arp-standalone.c
+++ b/iptables/xtables-arp-standalone.c
@@ -84,5 +84,10 @@  int xtables_arp_main(int argc, char *argv[])
 	if (ret)
 		ret = nft_commit(&h);
 
+	nft_fini(&h);
+
+	if (!ret)
+		fprintf(stderr, "arptables: %s\n", nft_strerror(errno));
+
 	exit(!ret);
 }