From nobody Tue Jul 29 07:49:25 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 4brnYK73hcz61tbN; Tue, 29 Jul 2025 07:49:25 +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 4brnYK65TXz3H3Q; Tue, 29 Jul 2025 07:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753775365; 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=vZ8ozSA3Fc0QWoCwPJhg/isleSsEWjwWGBmjC8k+RWM=; b=V7s0+8BOPBFRRuk6KKRpXtY9ov9F77BpDQAFKkwfjmfHiJFwr3+AOmEzScIA3rJ2Ko+Ilx XatFuz8ONnO9YUVWGOlgJecIS1OoE5ZmI/nJ1P8MypvCCgnKjePJsMJHG76zerpJY7WtSg 6Bh0S/TGDNbtO9uRkTl0LxKZkb4E5VPzhl6zyD9vZeX2GYXfR3Or8GMQa9VH4qDiEP5XX3 azQgVnQnhzyHPGBaV2qro1Ry+SEcLj+yn/p0fFMwc1ghpnEFmakpFRgM1f6wX3N8K3Ty5n XtnhziwYAHhdLPYV9swPIAZfhpJhT4xM/oWrR46EGNGqfgqYE4i/H8j1TyNUjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753775365; 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=vZ8ozSA3Fc0QWoCwPJhg/isleSsEWjwWGBmjC8k+RWM=; b=hz2RwCTXdyNC5CQpex9F+Tjg/gfabPeyTe6jhgvkxtfpp5WD04MOG3HFLf0oWwCaEjUH9a 0MOx7wxAREk6k4lTLBsd3DGp6bXlHMsYbVwRiDV2JYK5ey520n5iNfLo36+MvoNnhV/GJP 1cOkoA821pJyMNoG8YCH5Rz0GaF0D0x8BlRsZNm88znz3UgTVWbUbTF2N2C3tmRaJKPO+i QZibQSJrATdqpibnqkwMA269LuAgpIXrazv4LLjJGsxKrJD/9l2KaqKuEzW+ckfrKo2OiS op6FxuTP6w4QF/mt6jJNny5BaD9qy6D/dYo/3RLLbZs+fffeRHVmidh3C6Mb5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753775365; a=rsa-sha256; cv=none; b=pWw1FhpZV6HRpKNxokKEnYygppj1TW4B350X0o1LXdL+72bRtCN2hs2YmVoi9HMb0bUqbq t2jIwi9Szp7oiGaZvbar49NmleDQE3nu6q11Fjg9tPMu6M6MeWFkEKMIsOyGUzMkgI7xNH ba2pOYse/XQYkyzp0TC8JH5vgi16JwD6GsieZB+108JwHa6Ph7h87TjADBVGDXBa9VzPvS PDbbRHZ9L8hkwrqpp8emZ4QnAQtxA9OqVXBEscWa5CMwAbqnnV8A+qbQ1bZ48Cinj+XtiJ 0UvIk5pRmaMjr/aSDXLZxZo7jKpZr7p4k7nTsy7L33l+255Z0I23u6xhY8pCEg== 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 4brnYK5Y9bz6bH; Tue, 29 Jul 2025 07:49:25 +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 56T7nPUd065631; Tue, 29 Jul 2025 07:49:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56T7nPd8065628; Tue, 29 Jul 2025 07:49:25 GMT (envelope-from git) Date: Tue, 29 Jul 2025 07:49:25 GMT Message-Id: <202507290749.56T7nPd8065628@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: b731570eca60 - stable/14 - /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/14 X-Git-Reftype: branch X-Git-Commit: b731570eca60c421f9c42208d542b49073e33a6d Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b731570eca60c421f9c42208d542b49073e33a6d commit b731570eca60c421f9c42208d542b49073e33a6d Author: Michael Proto AuthorDate: 2025-07-13 21:30:28 +0000 Commit: Kristof Provost CommitDate: 2025-07-29 07:48:39 +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 51e9ff7d9f86..a023d04a1bb6 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 @@ -1140,8 +1140,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