svn commit: r186297 - head/sbin/ipfw

Paolo Pisati piso at FreeBSD.org
Thu Dec 18 21:37:31 UTC 2008


Author: piso
Date: Thu Dec 18 21:37:31 2008
New Revision: 186297
URL: http://svn.freebsd.org/changeset/base/186297

Log:
  Honor the quiet (-q) option while adding a nat rule.
  
  Submitted by:	Andrey V. Elsukov<bu7cher at yandex.ru>
  MFC after:	3 days

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==============================================================================
--- head/sbin/ipfw/ipfw2.c	Thu Dec 18 21:13:46 2008	(r186296)
+++ head/sbin/ipfw/ipfw2.c	Thu Dec 18 21:37:31 2008	(r186297)
@@ -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


More information about the svn-src-all mailing list