summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/nft-f/dumps/0028variable_cmdline_0.nft
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-07-20 12:17:33 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-07-20 17:47:55 +0200
commit9edaa6a51eab49a378dd358e0b4254d0398c629f (patch)
treecb44b02953b6672d4239ec6f97c3d59de5d6cb10 /tests/shell/testcases/nft-f/dumps/0028variable_cmdline_0.nft
parent640dc0c8a3daef65cd93868939b5a2877615f2d5 (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 'tests/shell/testcases/nft-f/dumps/0028variable_cmdline_0.nft')
-rw-r--r--tests/shell/testcases/nft-f/dumps/0028variable_cmdline_0.nft8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/shell/testcases/nft-f/dumps/0028variable_cmdline_0.nft b/tests/shell/testcases/nft-f/dumps/0028variable_cmdline_0.nft
new file mode 100644
index 00000000..aa081122
--- /dev/null
+++ b/tests/shell/testcases/nft-f/dumps/0028variable_cmdline_0.nft
@@ -0,0 +1,8 @@
+table inet filter {
+ set whitelist_v4 {
+ type ipv4_addr
+ elements = { 1.1.1.1, 2.2.2.2,
+ 3.3.3.3, 4.4.4.4,
+ 5.5.5.5 }
+ }
+}