]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
doc: clarify evaluation of chains
authorChristoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Sat, 11 Oct 2025 00:23:57 +0000 (02:23 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 15 Oct 2025 11:46:20 +0000 (13:46 +0200)
In particular:
- Mention that grouping of chains in tables is irrelevant to the evaluation
  order.
- Clarify that priorities only define the ordering of chains per hook.
- Improved potentially ambiguous wording “lower priority values have precedence
  over higher ones”, which could be mistaken as that rules from lower priority
  chains might “win” over such from higher ones (which is however only the case
  if they drop/reject packets).
  The new wording merely describes which chains are evaluated first, implicitly
  referring the question which verdict “wins” to the section where verdicts are
  described, and also should work when lower priority chains mangle packets (in
  which case they might actually be considered as having “precedence”).

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Signed-off-by: Florian Westphal <fw@strlen.de>
doc/nft.txt

index 42cdd38a27b67318345eb19068dd2bb2d173b043..78dbef66efe8ab0c5201c855efee801d8e8a3164 100644 (file)
@@ -465,8 +465,10 @@ status.
 
 The *priority* parameter accepts a signed integer value or a standard priority
 name which specifies the order in which chains with the same *hook* value are
-traversed. The ordering is ascending, i.e. lower priority values have precedence
-over higher ones.
+traversed (regardless of the table to which they belong). The ordering is
+ascending: for each hook, chains with lower priority values are evaluated
+before those with higher ones. The ordering of chains with identical priority
+is undefined.
 
 With *nat* type chains, there's a lower excluding limit of -200 for *priority*
 values, because conntrack hooks at this priority and NAT requires it.