diff options
author | Phil Sutter <phil@nwl.cc> | 2024-03-20 15:54:54 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-04-12 14:33:14 +0200 |
commit | 0ac39384fd9e48ff6bcc5605df2cbeb33af64b9e (patch) | |
tree | 1009847e954207c82d829d1c357712723d0cb789 /doc/libnftables-json.adoc | |
parent | 3bccc478d27498f7ecc8a0233176accb1b91f584 (diff) |
json: Accept more than two operands in binary expressions
The most common use case is ORing flags like
| syn | ack | rst
but nft seems to be fine with less intuitive stuff like
| meta mark set ip dscp << 2 << 3
so support all of them.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'doc/libnftables-json.adoc')
-rw-r--r-- | doc/libnftables-json.adoc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/doc/libnftables-json.adoc b/doc/libnftables-json.adoc index 3948a0ba..e3b24cc4 100644 --- a/doc/libnftables-json.adoc +++ b/doc/libnftables-json.adoc @@ -1343,15 +1343,17 @@ Perform kernel Forwarding Information Base lookups. === BINARY OPERATION [verse] -*{ "|": [* 'EXPRESSION'*,* 'EXPRESSION' *] }* -*{ "^": [* 'EXPRESSION'*,* 'EXPRESSION' *] }* -*{ "&": [* 'EXPRESSION'*,* 'EXPRESSION' *] }* -*{ "+<<+": [* 'EXPRESSION'*,* 'EXPRESSION' *] }* -*{ ">>": [* 'EXPRESSION'*,* 'EXPRESSION' *] }* - -All binary operations expect an array of exactly two expressions, of which the +*{ "|": [* 'EXPRESSION'*,* 'EXPRESSIONS' *] }* +*{ "^": [* 'EXPRESSION'*,* 'EXPRESSIONS' *] }* +*{ "&": [* 'EXPRESSION'*,* 'EXPRESSIONS' *] }* +*{ "+<<+": [* 'EXPRESSION'*,* 'EXPRESSIONS' *] }* +*{ ">>": [* 'EXPRESSION'*,* 'EXPRESSIONS' *] }* +'EXPRESSIONS' := 'EXPRESSION' | 'EXPRESSION'*,* 'EXPRESSIONS' + +All binary operations expect an array of at least two expressions, of which the first element denotes the left hand side and the second one the right hand -side. +side. Extra elements are accepted in the given array and appended to the term +accordingly. === VERDICT [verse] |