summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/nft-f
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-09-29 10:55:19 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-09-29 18:59:44 +0200
commit3639ce913dc47974322e8c38b8567338acc45d7d (patch)
tree0fa9db198bd5eb6d85277e5c3c17b8ef31fca49d /tests/shell/testcases/nft-f
parent50780456a01a077d778c236c4d4b64a00ed5acac (diff)
cache: set on cache flags for nested notation
Set on the cache flags for the nested notation too, this is fixing nft -f with two files, one that contains the set declaration and another that adds a rule that refers to such set. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1474 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/nft-f')
-rwxr-xr-xtests/shell/testcases/nft-f/0029split_file_025
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/shell/testcases/nft-f/0029split_file_0 b/tests/shell/testcases/nft-f/0029split_file_0
new file mode 100755
index 00000000..0cc547ab
--- /dev/null
+++ b/tests/shell/testcases/nft-f/0029split_file_0
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+RULESET="table inet filter {
+ set whitelist_v4 {
+ type ipv4_addr;
+ }
+
+ chain prerouting {
+ type filter hook prerouting priority filter;
+ }
+}
+"
+
+$NFT -f - <<< "$RULESET"
+
+RULESET="table inet filter {
+ chain prerouting {
+ ip daddr @whitelist_v4
+ }
+}
+"
+
+$NFT -f - <<< "$RULESET"