From owner-svn-src-head@FreeBSD.ORG Thu Dec 18 21:37:31 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DFA81065673; Thu, 18 Dec 2008 21:37:31 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8423E8FC13; Thu, 18 Dec 2008 21:37:31 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBILbV7b052888; Thu, 18 Dec 2008 21:37:31 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBILbVOt052886; Thu, 18 Dec 2008 21:37:31 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200812182137.mBILbVOt052886@svn.freebsd.org> From: Paolo Pisati Date: Thu, 18 Dec 2008 21:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186297 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 21:37:31 -0000 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 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