summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/nft-f/0022variables_0
blob: ee17a6272aa311633108366ba3f16ded652a5e58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

set -e

RULESET="define test1 = @y

table ip x {
	set y {
		type ipv4_addr
		flags dynamic,timeout
	}

	chain z {
		type filter hook input priority filter; policy accept;
		add \$test1 { ip saddr }
		update \$test1 { ip saddr timeout 30s }
		ip saddr \$test1
	}
}"

$NFT -f - <<< "$RULESET"