Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2025 14:15:48 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3c3322d7ee97 - main - pf.conf.5: rephrase macro section
Message-ID:  <202509171415.58HEFmp5010427@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=3c3322d7ee974673f6b8f7a490153f3558e71118

commit 3c3322d7ee974673f6b8f7a490153f3558e71118
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-08-25 15:08:36 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-09-17 14:15:16 +0000

    pf.conf.5: rephrase macro section
    
    In the manual pages for configuration files based on parse.y, describe
    the syntax of both defining and using macros, rather than exclusively
    relying on examples, which some of the pages do not even provide.
    In those pages containing tables of content, also clarify that
    the "Macros" section contains *definitions* of variables.
    Both changes were already committed to vm.conf(5) earlier.
    
    OK florian@, and deraadt also requests keeping these manuals in sync.
    
    Obtained from:  OpenBSD, schwarze <schwarze@openbsd.org>, 20aba01e82
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 share/man/man5/pf.conf.5 | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5
index edaa160dddf2..02114b3eaf3c 100644
--- a/share/man/man5/pf.conf.5
+++ b/share/man/man5/pf.conf.5
@@ -27,7 +27,7 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 20, 2025
+.Dd August 25, 2025
 .Dt PF.CONF 5
 .Os
 .Sh NAME
@@ -92,14 +92,20 @@ keyword, for example:
 include "/etc/pf/sub.filter.conf"
 .Ed
 .Sh MACROS
-Macros can be defined that will later be expanded in context.
-Macro names must start with a letter, and may contain letters, digits
-and underscores.
-Macro names may not be reserved words (for example
+A macro is defined with a command of the form
+.Ar name Ns = Ns Ar value .
+The macro
+.Ar name
+can contain letters, digits, and underscores and cannot be a reserved word
+(for example,
 .Ar pass ,
 .Ar in ,
+or
 .Ar out ) .
-Macros are not expanded inside quotes.
+Within unquoted arguments, the string
+.Pf $ Ar name
+is later expanded to
+.Ar value .
 Ranges of network addresses used in macros that will be expanded in lists
 later on must be quoted with additional simple quotes.
 .Pp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509171415.58HEFmp5010427>