diff options
-rw-r--r-- | ip6tables-standalone.c | 14 | ||||
-rw-r--r-- | iptables-standalone.c | 11 |
2 files changed, 18 insertions, 7 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); } diff --git a/iptables-standalone.c b/iptables-standalone.c index 208f71d7..91853884 100644 --- a/iptables-standalone.c +++ b/iptables-standalone.c @@ -69,9 +69,14 @@ main(int argc, char *argv[]) } if (!ret) { - fprintf(stderr, "iptables: %s. " - "Run `dmesg' for more information.\n", - iptc_strerror(errno)); + if (errno == EINVAL) { + fprintf(stderr, "iptables: %s. " + "Run `dmesg' for more information.\n", + iptc_strerror(errno)); + } else { + fprintf(stderr, "iptables: %s.\n", + iptc_strerror(errno)); + } if (errno == EAGAIN) { exit(RESOURCE_PROBLEM); } |