diff options
author | Phil Sutter <phil@nwl.cc> | 2023-12-15 01:10:39 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-04-19 19:21:21 +0200 |
commit | 4955ae1a81b73f9a61b7fbf1a73e11544513548e (patch) | |
tree | 7883c0cd9e049bdb80d7694a174d31ee3b44a278 /doc | |
parent | 83ed57d587afb248dc5dc72006b247319193008d (diff) |
Add support for table's persist flag
Bison parser lacked support for passing multiple flags, JSON parser
did not support table flags at all.
Document also 'owner' flag (and describe their relationship in nft.8.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/libnftables-json.adoc | 11 | ||||
-rw-r--r-- | doc/nft.txt | 9 |
2 files changed, 19 insertions, 1 deletions
diff --git a/doc/libnftables-json.adoc b/doc/libnftables-json.adoc index e3b24cc4..a8a6165f 100644 --- a/doc/libnftables-json.adoc +++ b/doc/libnftables-json.adoc @@ -202,12 +202,19 @@ Rename a chain. The new name is expected in a dedicated property named === TABLE [verse] +____ *{ "table": { "family":* 'STRING'*, "name":* 'STRING'*, - "handle":* 'NUMBER' + "handle":* 'NUMBER'*, + "flags":* 'TABLE_FLAGS' *}}* +'TABLE_FLAGS' := 'TABLE_FLAG' | *[* 'TABLE_FLAG_LIST' *]* +'TABLE_FLAG_LIST' := 'TABLE_FLAG' [*,* 'TABLE_FLAG_LIST' ] +'TABLE_FLAG' := *"dormant"* | *"owner"* | *"persist"* +____ + This object describes a table. *family*:: @@ -217,6 +224,8 @@ This object describes a table. *handle*:: The table's handle. In input, it is used only in *delete* command as alternative to *name*. +*flags*:: + The table's flags. === CHAIN [verse] diff --git a/doc/nft.txt b/doc/nft.txt index 248b29af..2080c073 100644 --- a/doc/nft.txt +++ b/doc/nft.txt @@ -343,8 +343,17 @@ return an error. |Flag | Description |dormant | table is not evaluated any more (base chains are unregistered). +|owner | +table is owned by the creating process. +|persist | +table shall outlive the owning process. |================= +Creating a table with flag *owner* excludes other processes from manipulating +it or its contents. By default, it will be removed when the process exits. +Setting flag *persist* will prevent this and the resulting orphaned table will +accept a new owner, e.g. a restarting daemon maintaining the table. + .*Add, change, delete a table* --------------------------------------- # start nft in interactive mode |