diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-07-20 12:17:33 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-07-20 17:47:55 +0200 |
commit | 9edaa6a51eab49a378dd358e0b4254d0398c629f (patch) | |
tree | cb44b02953b6672d4239ec6f97c3d59de5d6cb10 /doc/nft.txt | |
parent | 640dc0c8a3daef65cd93868939b5a2877615f2d5 (diff) |
src: add --define key=value
This patch adds a new option to define variables from the command line.
# cat test.nft
table netdev x {
chain y {
type filter hook ingress devices = $dev priority 0;
counter accept
}
}
# nft --define dev="{ eth0, eth1 }" -f test.nft
You can only combine it with -f/--filename.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'doc/nft.txt')
-rw-r--r-- | doc/nft.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/nft.txt b/doc/nft.txt index 46e8dc53..13fe8b1f 100644 --- a/doc/nft.txt +++ b/doc/nft.txt @@ -44,6 +44,10 @@ understanding of their meaning. You can get information about options by running *--file 'filename'*:: Read input from 'filename'. If 'filename' is -, read from stdin. +*-D*:: +*--define 'name=value'*:: + Define a variable. You can only combine this option with '-f'. + *-i*:: *--interactive*:: Read input from an interactive readline CLI. You can use quit to exit, or use the EOF marker, |