summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/typeof_sets_0
blob: 2a8b21c725c6908461ad9999660196847c717913 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

# support for strings/typeof in named sets.
# s1 and s2 are identical, they just use different
# ways for declaration.

EXPECTED="table inet t {
	set s1 {
		typeof osf name
		elements = { \"Linux\" }
	}

	set s2 {
		typeof vlan id
		elements = { 2, 3, 103 }
	}

	chain c1 {
		osf name @s1 accept
	}

	chain c2 {
		ether type vlan vlan id @s2 accept
	}
}"

set -e
$NFT -f - <<< $EXPECTED