diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2025-08-25 15:08:36 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2025-09-17 14:15:16 +0000 |
| commit | 3c3322d7ee974673f6b8f7a490153f3558e71118 (patch) | |
| tree | 24b9c609afef9f17af5054db7eb11facdb4fa65a | |
| parent | c016bd00294df7be6b3b3dbc661ac7b952831475 (diff) | |
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")
| -rw-r--r-- | share/man/man5/pf.conf.5 | 18 |
1 files 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 |
