iptables: refer to dmesg when we hit error
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>
diff --git a/ip6tables-standalone.c b/ip6tables-standalone.c
index ba30f0e..11c7cb0 100644
--- a/ip6tables-standalone.c
+++ b/ip6tables-standalone.c
@@ -72,7 +72,8 @@
}
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 001bb04..dbfae5b 100644
--- a/iptables-standalone.c
+++ b/iptables-standalone.c
@@ -73,7 +73,8 @@
}
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);