If the given table "t" does not exist, `pfctl -t t -T replace' and
`pfctl -t t -T add ::1' will create it persistently:

        # pfctl -sT
        # pfctl -tt -Tr
        1 table created.
        no changes.
        # pfctl -vsT
        -pa---- t

pf.conf(5) provides this information:

        Tables can be defined with any of the following pfctl(8) mechanisms.  As
        with macros, reserved words may not be used as table names.

        manually  Persistent tables can be manually created with the add or
                  replace option of pfctl(8), before or after the ruleset has
                  been loaded.
        [...]

        Tables may be defined with the following attributes:

        [...]
        persist   The persist flag forces the kernel to keep the table even when
                  no rules refer to it.  If the flag is not set, the kernel will
                  automatically remove the table when the last rule referring to
                  it is flushed.

But I miss it in pfctl(8)'s actual description of these table commands
where users are probably referring to first when looking into manual
table management.  Being clear about it does not hurt and barely adds
redundant information.

Feedback? Suggestions for better wording? OK?

Index: pfctl.8
===================================================================
RCS file: /cvs/src/sbin/pfctl/pfctl.8,v
retrieving revision 1.173
diff -u -p -r1.173 pfctl.8
--- pfctl.8     21 Dec 2018 11:16:04 -0000      1.173
+++ pfctl.8     30 Dec 2018 15:09:52 -0000
@@ -459,7 +459,7 @@ Kill a table.
 Flush all addresses of a table.
 .It Fl T Cm add
 Add one or more addresses in a table.
-Automatically create a nonexisting table.
+Automatically create a persistent table if it does not exist.
 .It Fl T Cm delete
 Delete one or more addresses from a table.
 .It Fl T Cm expire Ar number
@@ -471,7 +471,7 @@ For entries which have never had their s
 refers to the time they were added to the table.
 .It Fl T Cm replace
 Replace the addresses of the table.
-Automatically create a nonexisting table.
+Automatically create a persistent table if it does not exist.
 .It Fl T Cm show
 Show the content (addresses) of a table.
 .It Fl T Cm test

Reply via email to