From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH 3/3] iptables: refer to dmesg when we hit error
Date: Wed, 19 Nov 2008 00:44:00 +0100 [thread overview]
Message-ID: <20081118234400.15750.20296.stgit@Decadence> (raw)
In-Reply-To: <20081118234311.15750.80335.stgit@Decadence>
This does not make any better, but at least refer to
dmesg which is the common source of information to diagnose
kernel-side problems. This is helpful for newbie users.
# iptables -I INPUT -j CLUSTERIP
iptables: Invalid argument. Run `dmesg' for more information.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
ip6tables-standalone.c | 3 ++-
iptables-standalone.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ip6tables-standalone.c b/ip6tables-standalone.c
index 5bdcd4f..6c20bd8 100644
--- a/ip6tables-standalone.c
+++ b/ip6tables-standalone.c
@@ -70,7 +70,8 @@ main(int argc, char *argv[])
ret = ip6tc_commit(&handle);
if (!ret)
- fprintf(stderr, "ip6tables: %s\n",
+ fprintf(stderr, "ip6tables: %s. "
+ "Run `dmesg' for more information.\n",
ip6tc_strerror(errno));
exit(!ret);
diff --git a/iptables-standalone.c b/iptables-standalone.c
index 55d9bbe..630c586 100644
--- a/iptables-standalone.c
+++ b/iptables-standalone.c
@@ -71,7 +71,8 @@ main(int argc, char *argv[])
ret = iptc_commit(&handle);
if (!ret) {
- fprintf(stderr, "iptables: %s\n",
+ fprintf(stderr, "iptables: %s. "
+ "Run `dmesg' for more information.\n",
iptc_strerror(errno));
if (errno == EAGAIN) {
exit(RESOURCE_PROBLEM);
next prev parent reply other threads:[~2008-11-18 23:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 23:43 [PATCH 1/3] iptables: fix error reporting with wrong/missing arguments Pablo Neira Ayuso
2008-11-18 23:43 ` [PATCH 2/3] state: report spaces in the state list parsing Pablo Neira Ayuso
2008-11-19 9:29 ` Jan Engelhardt
2008-11-19 10:11 ` Pablo Neira Ayuso
2008-11-18 23:44 ` Pablo Neira Ayuso [this message]
2008-11-19 9:28 ` [PATCH 1/3] iptables: fix error reporting with wrong/missing arguments Jan Engelhardt
2008-11-19 10:05 ` 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=20081118234400.15750.20296.stgit@Decadence \
--to=pablo@netfilter.org \
--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).