summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2007-10-17 16:36:49 +0000
committerPatrick McHardy <kaber@trash.net>2007-10-17 16:36:49 +0000
commitaae4f82eb83d923f59a328d6e13396f424be28f9 (patch)
tree543f70532676d420109cbf734e9e193e39641763 /iptables.c
parent1a96f36bb85c030a2badee895f78598c608e2f47 (diff)
[PATCH iptables] print warnings to stderr
iptables prints some of its error messages and warnings to stdout. This patch applies to svn r7075 and will make iptables print diagnostic messages to stderr instead. Signed-off-by: Max Kellermann <max@duempel.org>
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/iptables.c b/iptables.c
index 25ca3583..7096121c 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1818,7 +1818,7 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
optarg[0] = '\0';
continue;
}
- printf("Bad argument `%s'\n", optarg);
+ fprintf(stderr, "Bad argument `%s'\n", optarg);
exit_tryhelp(2);
default:
@@ -1990,8 +1990,9 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
}
if (target && iptc_is_chain(jumpto, *handle)) {
- printf("Warning: using chain %s, not extension\n",
- jumpto);
+ fprintf(stderr,
+ "Warning: using chain %s, not extension\n",
+ jumpto);
if (target->t)
free(target->t);