summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw/ipfw2.c
diff options
context:
space:
mode:
authorpiso <piso@FreeBSD.org>2008-12-18 21:37:31 +0000
committerpiso <piso@FreeBSD.org>2008-12-18 21:37:31 +0000
commit9102cbe344a04848798c70cd2257812a15a4512e (patch)
tree79268213365fe077b4f571516687a5044303104c /sbin/ipfw/ipfw2.c
parent3b6abee3bbd82374d026f0be166d1fd13301fc3b (diff)
downloadFreeBSD-src-9102cbe344a04848798c70cd2257812a15a4512e.zip
FreeBSD-src-9102cbe344a04848798c70cd2257812a15a4512e.tar.gz
Honor the quiet (-q) option while adding a nat rule.
Submitted by: Andrey V. Elsukov<bu7cher@yandex.ru> MFC after: 3 days
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r--sbin/ipfw/ipfw2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index e382f93..7834783 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -4067,10 +4067,12 @@ config_nat(int ac, char **av)
if (i)
err(1, "setsockopt(%s)", "IP_FW_NAT_CFG");
- /* After every modification, we show the resultant rule. */
- int _ac = 3;
- char *_av[] = {"show", "config", id};
- show_nat(_ac, _av);
+ if (!do_quiet) {
+ /* After every modification, we show the resultant rule. */
+ int _ac = 3;
+ char *_av[] = {"show", "config", id};
+ show_nat(_ac, _av);
+ }
}
static void
OpenPOWER on IntegriCloud