Bug 290705 - pf.conf: New-style NAT rules not documented in BNF
Summary: pf.conf: New-style NAT rules not documented in BNF
Status: In Progress
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kristof Provost
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-31 20:56 UTC by eborisch+FreeBSD
Modified: 2025-12-01 10:33 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eborisch+FreeBSD 2025-10-31 20:56:04 UTC
The new NAT filter options (nat-to, rdr-to, binat-to), while having 
a number of examples included, are not represented in the BNF section
of pf.conf.5.

Cribbing from OpenBSD, the needed additions are likely:

filteropt = [...]
"binat-to" ( redirhost | "{" redirhost-list "}" )
[ portspec ] [ pooltype ] |
"rdr-to" ( redirhost | "{" redirhost-list "}" )
[ portspec ] [ pooltype ] |
"nat-to" ( redirhost | "{" redirhost-list "}" )
[ portspec ] [ pooltype ] [ "static-port" ] |
[...]

REF: https://cgit.freebsd.org/src/commit/?id=e0fe26691fc98a16cdda9d4f4beea9c5698ac64a (implementation and examples added to pf.conf.5; BNF section untouched.)
Comment 1 eborisch+FreeBSD 2025-10-31 20:59:22 UTC
They're also not mentioned in the 15.0 release notes currently, not that they necessarily _need_ to be.
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-11-03 16:07:03 UTC
A commit in branch main references this bug:

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

commit cd7f3e4d9e8305f866cf15e91b2ad01eb7685ba2
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-11-03 16:05:25 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-11-03 16:06:10 +0000

    pf.conf.5: add nat-to/rdr-to to BNF

    PR:             290705
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

 share/man/man5/pf.conf.5 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-11-10 08:38:26 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1c7c2027f2d1eaabd909382594062e46f90bae56

commit 1c7c2027f2d1eaabd909382594062e46f90bae56
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-11-03 16:05:25 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-11-10 08:37:48 +0000

    pf.conf.5: add nat-to/rdr-to to BNF

    PR:             290705
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

    (cherry picked from commit cd7f3e4d9e8305f866cf15e91b2ad01eb7685ba2)

 share/man/man5/pf.conf.5 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Comment 4 crest 2025-12-01 10:33:26 UTC
(In reply to eborisch+FreeBSD from comment #1)
But they defentively should be.