From owner-svn-src-all@freebsd.org Thu Mar 29 04:51:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 979D0F754C9; Thu, 29 Mar 2018 04:51:08 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 459067A0D3; Thu, 29 Mar 2018 04:51:08 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 407C81536D; Thu, 29 Mar 2018 04:51:08 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2T4p8Te035074; Thu, 29 Mar 2018 04:51:08 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2T4p8NK035072; Thu, 29 Mar 2018 04:51:08 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201803290451.w2T4p8NK035072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 29 Mar 2018 04:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331728 - in stable/11/etc: . rc.d X-SVN-Group: stable-11 X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: in stable/11/etc: . rc.d X-SVN-Commit-Revision: 331728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2018 04:51:08 -0000 Author: araujo Date: Thu Mar 29 04:51:07 2018 New Revision: 331728 URL: https://svnweb.freebsd.org/changeset/base/331728 Log: MFC r329817: The firewall_type is ignored if not set in rc.conf or rc.conf.local, after r190575 there is an option to call rc.firewall with the firewall_type passed in as an argument. Submitted by: David P. Discher Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D14286 Modified: stable/11/etc/rc.d/ipfw stable/11/etc/rc.firewall Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.d/ipfw ============================================================================== --- stable/11/etc/rc.d/ipfw Thu Mar 29 04:41:45 2018 (r331727) +++ stable/11/etc/rc.d/ipfw Thu Mar 29 04:51:07 2018 (r331728) @@ -40,7 +40,11 @@ ipfw_start() { local _firewall_type - _firewall_type=$1 + if [ -n "${1}" ]; then + _firewall_type=$1 + else + _firewall_type=${firewall_type} + fi # set the firewall rules script if none was specified [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall Modified: stable/11/etc/rc.firewall ============================================================================== --- stable/11/etc/rc.firewall Thu Mar 29 04:41:45 2018 (r331727) +++ stable/11/etc/rc.firewall Thu Mar 29 04:51:07 2018 (r331728) @@ -112,12 +112,20 @@ setup_ipv6_mandatory() { ${fwcmd} add pass ipv6-icmp from any to any icmp6types 2,135,136 } +. /etc/rc.subr +. /etc/network.subr + if [ -n "${1}" ]; then firewall_type="${1}" fi +if [ -z "${firewall_rc_config_load}" ]; then + load_rc_config ipfw +else + for i in ${firewall_rc_config_load}; do + load_rc_config $i + done +fi -. /etc/rc.subr -. /etc/network.subr afexists inet6 ipv6_available=$?