summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/collapse_elem_0
blob: 52a42c2f7305f56f6cb235fefeb2a8218ad8638d (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
#!/bin/bash

set -e

RULESET="table ip a {
	set x {
		type inet_service;
	}
}
table ip6 a {
	set x {
		type inet_service;
	}
}
add element ip a x { 1 }
add element ip a x { 2 }
add element ip6 a x { 2 }"

$NFT -f - <<< $RULESET

RULESET="define m = { 3, 4 }
add element ip a x \$m
add element ip a x { 5 }"

$NFT -f - <<< $RULESET