]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: refer to dmesg when we hit error
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 19 Nov 2008 18:01:26 +0000 (19:01 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 19 Nov 2008 18:01:26 +0000 (19:01 +0100)
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
iptables-standalone.c

index ba30f0e6b4af377f2abb5f3a26f80f7196858e69..11c7cb0a18f555b9deebe2e2c12097b9fffa212b 100644 (file)
@@ -72,7 +72,8 @@ main(int argc, char *argv[])
        }
 
        if (!ret)
-               fprintf(stderr, "ip6tables: %s\n",
+               fprintf(stderr, "ip6tables: %s. "
+                               "Run `dmesg' for more information.\n",
                        ip6tc_strerror(errno));
 
        exit(!ret);
index 001bb04b0203e9aa1a264f265d7a6265f79f8d55..dbfae5bec68326cc958e61950e306b75dafbec17 100644 (file)
@@ -73,7 +73,8 @@ main(int argc, char *argv[])
        }
 
        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);