summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/comments/comments_0
blob: a50387d6bfcfc07a3a44e428df2d17bbfda7cfc1 (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
37
38
39
40
41
42
43
44
#!/bin/bash

RULESET="table inet x {		# comment
        # comment 1
	# comment 2
	set y { # comment here
		type ipv4_addr	# comment
		elements = {
			# 1.1.1.1
                        2.2.2.2, # comment
                        # more comments
                        3.3.3.3,	# comment
# comment
                }
		# comment
        }

	# comments are allowed here
	chain y {
		# comments are allowed here
		icmpv6 type {
			1,	# comments are allowed here
			2,
		} accept

		icmp type {
# comment
			1,
			# comments also allowed here
			2,
		} accept

		tcp dport {
			# normal FTP
			21,
			# patched FTP
			2121
		} counter accept
	}
}
"

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