summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/typeof_sets_1
blob: e520270c09d8eb068c084225e04882325f48d755 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# regression test for corner case in netlink_delinearize

EXPECTED="table bridge t {
	set nodhcpvlan {
		typeof vlan id
		elements = { 1 }
	}

	chain c1 {
		vlan id != @nodhcpvlan vlan type arp counter packets 0 bytes 0 jump c2
		vlan id != @nodhcpvlan vlan type ip counter packets 0 bytes 0 jump c2
		vlan id != { 1, 2 } vlan type ip6 counter packets 0 bytes 0 jump c2
	}

	chain c2 {
	}
}"

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