diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-03-24 13:08:24 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-03-24 13:08:24 +0100 |
commit | 6e70f46f2a146bb7c657f71724c999147a5925dc (patch) | |
tree | db9bc0bd0b86d9954ed1000b4545013af02df853 /ip6tables-standalone.c | |
parent | ca6ccdb172b1846152dea421c215122759b84d29 (diff) |
iptables: refer to dmesg if we hit EINVALv1.4.3.1
With this patch, iptables refers to dmesg for further
troubleshooting if we hit EINVAL.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'ip6tables-standalone.c')
-rw-r--r-- | ip6tables-standalone.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ip6tables-standalone.c b/ip6tables-standalone.c index c0ca6459..649ac3d8 100644 --- a/ip6tables-standalone.c +++ b/ip6tables-standalone.c @@ -68,10 +68,16 @@ main(int argc, char *argv[]) ip6tc_free(handle); } - if (!ret) - fprintf(stderr, "ip6tables: %s. " - "Run `dmesg' for more information.\n", - ip6tc_strerror(errno)); + if (!ret) { + if (errno == EINVAL) { + fprintf(stderr, "ip6tables: %s. " + "Run `dmesg' for more information.\n", + ip6tc_strerror(errno)); + } else { + fprintf(stderr, "ip6tables: %s.\n", + ip6tc_strerror(errno)); + } + } exit(!ret); } |