From 8d5b7e557b65cd547b55567ac3dfbb2ea3f65418 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 12 Nov 2018 15:02:52 +0100 Subject: [PATCH] nft.8: Clarify 'index' option of add rule command Documentation for add rule command might trick readers into believing the optional 'index' argument does not need to be that of an existing rule. This false assumption is fueled by the fact that iptables allows to insert with last rule number + 1 to actually append to a chain. Change the relevant sentence to clarify that. While being at it, drop the deprecated 'position' option from documentation - since this will likely go away at some point, don't encourage users to use it although they should notice that they shoudn't. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso (cherry picked from commit f4e40e395af2b73cd72c5454e41fb879da8c5f61) Conflicts: doc/nft.txt -> Patch applied manually to doc/nft.xml from asciidoc source. Signed-off-by: Phil Sutter --- doc/nft.xml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/doc/nft.xml b/doc/nft.xml index 22d57ac630037..512724ed8f9a7 100644 --- a/doc/nft.xml +++ b/doc/nft.xml @@ -877,10 +877,7 @@ add table inet mytable chain - - handle - position - + handle handle @@ -917,8 +914,8 @@ add table inet mytable The add and insert commands support an optional - location specifier, which is either a handle of an existing - rule or an index (starting at zero). Internally, + location specifier, which is either a handle or the + index (starting at zero) of an existing rule. Internally, rule locations are always identified by handle and the translation from index happens in userspace. This has two potential implications in case a concurrent ruleset change happens after the translation @@ -935,8 +932,6 @@ add table inet mytable Add a new rule described by the list of statements. The rule is appended to the given chain unless a handle is specified, in which case the rule is appended to the rule given by the handle. - The alternative name position is deprecated and should not be - used anymore. -- 2.19.0