]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
doc: add undefine and redefine keywords
authorPierre Ducroquet <pducroquet@entrouvert.com>
Mon, 7 Feb 2022 09:48:11 +0000 (10:48 +0100)
committerFlorian Westphal <fw@strlen.de>
Mon, 7 Feb 2022 13:55:30 +0000 (14:55 +0100)
Signed-off-by: Florian Westphal <fw@strlen.de>
doc/nft.txt

index 7240deaa810026c6015ae7bfec67d7204960257e..f7a53ac92484498e67c93fc6e0becf43aba4b1b4 100644 (file)
@@ -170,17 +170,23 @@ SYMBOLIC VARIABLES
 ~~~~~~~~~~~~~~~~~~
 [verse]
 *define* 'variable' *=* 'expr'
+*undefine* 'variable'
+*redefine* 'variable' *=* 'expr'
 *$variable*
 
 Symbolic variables can be defined using the *define* statement. Variable
 references are expressions and can be used to initialize other variables. The scope
 of a definition is the current block and all blocks contained within.
+Symbolic variables can be undefined using the *undefine* statement, and modified
+using the *redefine* statement.
 
 .Using symbolic variables
 ---------------------------------------
 define int_if1 = eth0
 define int_if2 = eth1
 define int_ifs = { $int_if1, $int_if2 }
+redefine int_if2 = wlan0
+undefine int_if2
 
 filter input iif $int_ifs accept
 ---------------------------------------