netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: giuseppelng@gmail.com
Subject: [PATCH xtables-compat 3/4] arptables-compat: fix missing error reporting
Date: Wed,  8 Oct 2014 22:17:50 +0200	[thread overview]
Message-ID: <1412799471-7721-3-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1412799471-7721-1-git-send-email-pablo@netfilter.org>

 # 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 --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);
 }
-- 
1.7.10.4


  parent reply	other threads:[~2014-10-08 20:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 20:17 [PATCH xtables-compat 1/4] iptables-compat: nft: fix user chain addition, deletion and rename Pablo Neira Ayuso
2014-10-08 20:17 ` [PATCH xtables-compat 2/4] iptables-compat: nft: fix error reporting Pablo Neira Ayuso
2014-10-08 20:17 ` Pablo Neira Ayuso [this message]
2014-10-08 20:17 ` [PATCH xtables-compat 4/4] arptables-compat: allow to not specify a target Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412799471-7721-3-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=giuseppelng@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).