The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc353e5e61fadd6ef618948f417f96381c08239c
commit fc353e5e61fadd6ef618948f417f96381c08239c Author: Kristof Provost <[email protected]> AuthorDate: 2026-01-14 06:18:27 +0000 Commit: Kristof Provost <[email protected]> CommitDate: 2026-01-14 11:31:58 +0000 pfctl: allow new page character (^L) in pf.conf PF configuration files can contains many things. Using the new page characters (i.e. ^L, \014) to mark the beginning of parts is useful because many editors such as emacs and vim has facilities to jump next/previous ones. PR: 86635 MFC after: 2 weeks Submitted by: MOROHOSHI Akihiko <[email protected]> Submitted by: Simon Wollwage <[email protected]> Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 2 +- sbin/pfctl/tests/files/pf1078.in | 3 +++ sbin/pfctl/tests/files/pf1078.ok | 2 ++ sbin/pfctl/tests/pfctl_test_list.inc | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 67e0d30890a8..72589f309f54 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -7399,7 +7399,7 @@ yylex(void) top: p = buf; - while ((c = lgetc(0)) == ' ' || c == '\t') + while ((c = lgetc(0)) == ' ' || c == '\t' || c == '\014') ; /* nothing */ yylval.lineno = file->lineno; diff --git a/sbin/pfctl/tests/files/pf1078.in b/sbin/pfctl/tests/files/pf1078.in new file mode 100644 index 000000000000..11ce16d5fdc9 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1078.in @@ -0,0 +1,3 @@ +pass in proto tcp + +pass in proto udp diff --git a/sbin/pfctl/tests/files/pf1078.ok b/sbin/pfctl/tests/files/pf1078.ok new file mode 100644 index 000000000000..585236af942a --- /dev/null +++ b/sbin/pfctl/tests/files/pf1078.ok @@ -0,0 +1,2 @@ +pass in proto tcp all flags S/SA keep state +pass in proto udp all keep state diff --git a/sbin/pfctl/tests/pfctl_test_list.inc b/sbin/pfctl/tests/pfctl_test_list.inc index a7328a860dda..ff51af7562d1 100644 --- a/sbin/pfctl/tests/pfctl_test_list.inc +++ b/sbin/pfctl/tests/pfctl_test_list.inc @@ -186,3 +186,4 @@ PFCTL_TEST_FAIL(1074, "Filter AF different than route-to AF, without prefer-ipv6 PFCTL_TEST(1075, "One shot rule") PFCTL_TEST(1076, "State limiter") PFCTL_TEST(1077, "Source limiter") +PFCTL_TEST(1078, "New page")
