From nobody Tue Jul 29 07:49:26 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4brnYM38WXz61tDR; Tue, 29 Jul 2025 07:49:27 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4brnYM0vFyz3H8J; Tue, 29 Jul 2025 07:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753775367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s9//ny0HBfwdvMZnyTsOw62o/HsghTEPH7U/RWOK2K0=; b=XWxBzSXm/ZJugNDOxmdXZrReeTtBBI6BQpB4UggMq5RHcX/sribakUQzfJ8EACIkP/i1/R goVjXxqE/LWmRXuL54Hqejb02q35pGfawKfOx0mhDygrK+VB8anIwjYzUt6ZqDV3YtBtVm jgblNfjP1kihPE+BC/ZnCAQzNlaiQBQZAOWu0Ly4Hi6NG7RO0lfmBhkijzL8QzsDt7yA2D 6nptLe/Eo3uihzaQc4bADba+WmxA7kLP2/iuFqLHnydez6mnO6J4P/P1nQtJ6o/efx8z84 +prOCaOhyZVurE0+2CFIkYU7BYjCkpBl5MX5xQeQez+4mMa7hUSHj+gMU2ntVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753775367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s9//ny0HBfwdvMZnyTsOw62o/HsghTEPH7U/RWOK2K0=; b=mpLej0u2qjS73cmeiFSj4wE3ASxs/a7/VZWEOUWl8ww0V9Tni5vOQk8nfGLxeHzA8h726u ARg0GKwu+ZaBcnMO5eSUUwQCxEyN20ITrjcQ65jv3wIxk9d1xUPZpmeBNOsYYnFCYJ9TZM VZqbke6krBooblUoeEh91t8utUuBHqdHtkyaW0TrM/5Ma8zQCfEjICOUsUfBAjJT5RyxtD msBkxmUEGePqml2BIo/ERQ2Hdb5nrWGOPJjIotd55/7ou9+TXIkZx4PMEK1kvZBXglvjzJ D/Gtrl3Yrsh/qKicBgF11BQ+kFeWtIduBMRpd/iIo59+EEqWOZTpIVJjgiVPYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753775367; a=rsa-sha256; cv=none; b=TZbvtdrLX9TVojJRkfC7/C669trUYfK6UgYdMzIXOuAWNLuJeb8TKd1bfEAi1ZBpV93+xb M8QntgwGHgaVYYaO5ppy0R2NciqUMKqJUkyeoa1v3al26ehMI/Scv5uh9tA6Z91rCMVu9d qL9fj6FH4B0mFUeo41zPpY6XgBdX9Fzy1BKeEmkQ2Ul6oU4NrbdkWgsdIBV2SGnJwN5ZTa Mux+jSbEONF7RMedV9MIDtEYSR1TMDRZDbtGnD+gaRY6349DD0tTvnSoAALx6neg4yhpqW 2oZQZW05szznVHZbd72SaHC4AjGEG/9yjp5VKq5YUCxd+O+JRqsQbDsthG6Kqg== 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 4brnYM0Qjgz6W3; Tue, 29 Jul 2025 07:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56T7nQfp065756; Tue, 29 Jul 2025 07:49:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56T7nQQR065753; Tue, 29 Jul 2025 07:49:26 GMT (envelope-from git) Date: Tue, 29 Jul 2025 07:49:26 GMT Message-Id: <202507290749.56T7nQQR065753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 0bb490bdbff4 - stable/13 - /etc/rc.d/pf: Fix for multi-line pf_fallback_rules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0bb490bdbff4bb39e7a3429ee2176bd123b627ca Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0bb490bdbff4bb39e7a3429ee2176bd123b627ca commit 0bb490bdbff4bb39e7a3429ee2176bd123b627ca Author: Michael Proto AuthorDate: 2025-07-13 21:30:28 +0000 Commit: Kristof Provost CommitDate: 2025-07-29 07:48:51 +0000 /etc/rc.d/pf: Fix for multi-line pf_fallback_rules Setting multiple pf_fallback_rules in /etc/rc.conf as per the documentation produces invalid pf syntax due to the lack of echo quoting $pf_fallback_rules in /etc/rc.d/pf. Adding quotes around the $pf_fallback_rules echo maintains newlines needed for valid pfctl syntax. Provided patch resolves the issue Also updating rc.conf(5) to reflect that multi-line pf_fallback_rules should not include a trailing backslash (\) as line breaks are needed when passing rules to pfctl via stdin. PR: 288197 Reviewed by: kp MFC after: 2 weeks (cherry picked from commit 9e8c1f9576e75fcd34007c6e8a4a6da0b1b2f1e2) --- libexec/rc/rc.d/pf | 2 +- share/man/man5/rc.conf.5 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc.d/pf b/libexec/rc/rc.d/pf index f227782e640c..f5871c367c6a 100755 --- a/libexec/rc/rc.d/pf +++ b/libexec/rc/rc.d/pf @@ -35,7 +35,7 @@ pf_fallback() $pf_program -f "$pf_fallback_rules_file" $pf_flags else warn "Loading fallback rules: $pf_fallback_rules" - echo $pf_fallback_rules | $pf_program -f - $pf_flags + echo "$pf_fallback_rules" | $pf_program -f - $pf_flags fi } diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index f588f12eee59..8dd871d7c779 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 7, 2025 +.Dd July 15, 2025 .Dt RC.CONF 5 .Os .Sh NAME @@ -1101,8 +1101,8 @@ and is not found. Multiple rules can be set as follows: .Bd -literal -pf_fallback_rules="\\ - block drop log all\\ +pf_fallback_rules=" + block drop log all pass in quick on em0" .Pp .Ed