Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2009 22:32:36 +0000 (UTC)
From:      Paolo Pisati <piso@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r186915 - stable/7/sbin/ipfw
Message-ID:  <200901082232.n08MWaqw035249@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: piso
Date: Thu Jan  8 22:32:35 2009
New Revision: 186915
URL: http://svn.freebsd.org/changeset/base/186915

Log:
  MFC r186297 and r186298:
  
  Honor the quiet (-q) option while adding a nat rule.

Modified:
  stable/7/sbin/ipfw/   (props changed)
  stable/7/sbin/ipfw/ipfw.8
  stable/7/sbin/ipfw/ipfw2.c

Modified: stable/7/sbin/ipfw/ipfw.8
==============================================================================
--- stable/7/sbin/ipfw/ipfw.8	Thu Jan  8 21:46:55 2009	(r186914)
+++ stable/7/sbin/ipfw/ipfw.8	Thu Jan  8 22:32:35 2009	(r186915)
@@ -65,6 +65,7 @@
 .Op Ar number ...
 .Pp
 .Nm
+.Op Fl q
 .Cm nat
 .Ar number
 .Cm config
@@ -231,6 +232,7 @@ Try to resolve addresses and service nam
 .It Fl q
 While
 .Cm add Ns ing ,
+.Cm nat Ns ing ,
 .Cm zero Ns ing ,
 .Cm resetlog Ns ging
 or

Modified: stable/7/sbin/ipfw/ipfw2.c
==============================================================================
--- stable/7/sbin/ipfw/ipfw2.c	Thu Jan  8 21:46:55 2009	(r186914)
+++ stable/7/sbin/ipfw/ipfw2.c	Thu Jan  8 22:32:35 2009	(r186915)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901082232.n08MWaqw035249>