From 3fc7bd58bc853c5112eac00eaceb9b98f54c3e40 Mon Sep 17 00:00:00 2001 From: Paolo Pisati Date: Thu, 18 Dec 2008 21:37:31 +0000 Subject: [PATCH] Honor the quiet (-q) option while adding a nat rule. Submitted by: Andrey V. Elsukov MFC after: 3 days --- sbin/ipfw/ipfw2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index e382f939fb53..7834783c0cb8 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