path: root/include
diff options
authorPablo Neira Ayuso <>2016-08-16 23:30:18 +0200
committerPablo Neira Ayuso <>2016-08-18 03:14:58 +0200
commit6f2eb8548e0d18078989adec069b438b2f154767 (patch)
tree6e2e838e8a6c20f24a8ce2d8fea65e0fa3966f26 /include
parent860979abdbe3081c310a5acd9250abdfcb741ce4 (diff)
src: meta priority support using tc classid
This patch adds the missing bits to scan and parse the meta priority handle as expressed by tc classid major:minor syntax. The :minor syntax is not support for two reason: major is always >= 1 and this clashes with port syntax in nat. Here below, several example on how to match the packet priority field: nft add rule filter forward meta priority abcd:0 nft add rule filter forward meta priority abcd:1234 and to set it, you have to: nft add rule filter forward meta priority set abcd:1234 The priority expression in flex looks ahead to restrict the pattern to avoid problems with mappings: {classid}/[ \t\n:\-},] So the following doesn't break: ... vmap { 25:accept } ^^^^^ The lookahead expression requires a slight change to extend the input string in one byte. This patch is conservative as you always have to explicity indicate major and minor numbers even if zero. We could consider supporting this shortcut in the future: abcd: However, with regards to this: :abcd We don't need to support it since major number is assumed to be >= 1. However, if we ever decide to support this, we'll have problems since this clashes with our port representation in redirect and mangle. So let's keep this simple and start with this approach. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions