From owner-dev-commits-src-main@freebsd.org Mon May 3 10:29:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F27462E1B4; Mon, 3 May 2021 10:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FYfMx6v2Tz4gH7; Mon, 3 May 2021 10:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFAFF1CA1C; Mon, 3 May 2021 10:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 143AT1O5048791; Mon, 3 May 2021 10:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 143AT1Yl048790; Mon, 3 May 2021 10:29:01 GMT (envelope-from git) Date: Mon, 3 May 2021 10:29:01 GMT Message-Id: <202105031029.143AT1Yl048790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 5c4fe2ac81a5 - main - service/ipfw: Silence warning on restart MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c4fe2ac81a5e05062266d684fb53b9faefd0d38 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2021 10:29:02 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=5c4fe2ac81a5e05062266d684fb53b9faefd0d38 commit 5c4fe2ac81a5e05062266d684fb53b9faefd0d38 Author: Lutz Donnerhacke AuthorDate: 2021-05-02 20:47:04 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-05-03 10:27:20 +0000 service/ipfw: Silence warning on restart Once the ipfw0 interface has been created, ifconfig(8) create will throw a warning: ifconfig: create: bad value' when trying to create it again. PR: 241013 Submitted by: Jose Luis Duran Approved by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30083 --- libexec/rc/rc.d/ipfw | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw index ece0a93ba6f4..fd1c97671d70 100755 --- a/libexec/rc/rc.d/ipfw +++ b/libexec/rc/rc.d/ipfw @@ -74,8 +74,14 @@ ipfw_start() ${SYSCTL} net.inet.ip.fw.verbose=1 >/dev/null fi if checkyesno firewall_logif; then - ifconfig ipfw0 create - echo 'Firewall logging pseudo-interface (ipfw0) created.' + if ! ifconfig ipfw0 >/dev/null 2>&1; then + ifconfig ipfw0 create + echo 'Firewall logging pseudo-interface (ipfw0)' \ + 'created.' + else + echo 'Firewall logging pseudo-interface (ipfw0)' \ + 'already created.' + fi fi }