summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps/dumps/typeof_maps_0.nft
blob: a5c0a60927a7b2757c1f68e35dc0e008f6462d88 (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
30
31
32
33
34
35
36
table inet t {
	map m1 {
		typeof osf name : ct mark
		elements = { "Linux" : 0x00000001 }
	}

	map m2 {
		typeof vlan id : meta mark
		elements = { 1 : 0x00000001, 4095 : 0x00004095 }
	}

	map m3 {
		typeof ip saddr . ip daddr : meta mark
		elements = { 1.2.3.4 . 5.6.7.8 : 0x00000001,
			     2.3.4.5 . 6.7.8.9 : 0x00000002 }
	}

	map m4 {
		typeof iifname . ip protocol . th dport : verdict
		elements = { "eth0" . tcp . 22 : accept }
	}

	map m5 {
		typeof ipsec in reqid . iifname : verdict
		elements = { 23 . "eth0" : accept }
	}

	chain c {
		ct mark set osf name map @m1
		meta mark set vlan id map @m2
		meta mark set ip saddr . ip daddr map @m3
		iifname . ip protocol . th dport vmap @m4
		iifname . ip protocol . th dport vmap { "eth0" . tcp . 22 : accept, "eth1" . udp . 67 : drop }
		ipsec in reqid . iifname vmap @m5
	}
}