File: nftables.yaml

package info (click to toggle)
micro 2.0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,828 kB
  • sloc: sh: 247; makefile: 77; xml: 53
file content (30 lines) | stat: -rw-r--r-- 1,141 bytes parent folder | download | duplicates (2)
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
filetype: nftables

detect:
    filename: "(nftables\\.(conf|rules)$|nftables(\\.rules)?\\.d/)"
    header: "^(#!.*/(env +)?nft( |$)|flush +ruleset)"

rules:
    - type: "\\b(chain|counter|map|rule|ruleset|set|table)\\b"
    - type: "\\b(ether|inet|i(cm)?p(x|(v?(4|6))?)|tcp|udp|8021q)\\b"
    - special: "\\b(element(s)?|hook|policy|priority|type|state)\\b"
    - identifier: "\\b(ct|iif|iifname|meta|oif|oifname|th|dport|sport|saddr|daddr|l4proto)\\b"
    - statement: "\\b(accept|drop|goto|jump|log|masquerade|reject|limit|queue)\\b"
    - preproc: "\\b(add|define|flush|include|delete)\\b"
    - symbol.operator: "[<>.&|^!=:;,@]|\\b(and|ge|gt|le|lt|or|xor)\\b"
    - constant.string:
        start: "\""
        end: "\""
        rules: []
      # Integer Constants
    - constant.number: "\\b([0-9]+)\\b"
    - constant.number: "\\b(0x[0-9a-fA-F]+)\\b"
    - identifier.var: "[$@][a-zA-Z_.][a-zA-Z0-9_/.-]*"
    - comment: "(^|[[:space:]])#([^{].*)?$"
    - indent-char.whitespace: "[[:space:]]+$"
    - indent-char: "    + +| +  +"
    - comment:
        start: "#"
        end: "$"
        rules:
            - todo: "(TODO|FIXME):?"