diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-03-18 13:10:55 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-03-20 18:50:03 +0100 |
commit | b11b6c68e61ea294eb4c313705ccfe3e7b0eda87 (patch) | |
tree | d84b4a22c6648a2bf7d2774801db85bd56c3b345 /tests/py/inet/tcp.t.json | |
parent | ea011231c06cbe828cf6056bc9c3d116e1f528d5 (diff) |
netlink_delinearize: restore binop syntax when listing ruleset for flags
c3d57114f119 ("parser_bison: add shortcut syntax for matching flags
without binary operations") provides a similar syntax to iptables using
a prefix representation for flag matching.
Restore original representation using binop when listing the ruleset.
The parser still accepts the prefix notation for backward compatibility.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/inet/tcp.t.json')
-rw-r--r-- | tests/py/inet/tcp.t.json | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/tests/py/inet/tcp.t.json b/tests/py/inet/tcp.t.json index 8439c2b5..d3a846cf 100644 --- a/tests/py/inet/tcp.t.json +++ b/tests/py/inet/tcp.t.json @@ -1712,7 +1712,7 @@ } ] -# tcp flags & (fin | syn | rst | ack) == (syn | ack) +# tcp flags & (fin | syn | rst | ack) == syn | ack [ { "match": { @@ -1741,7 +1741,7 @@ } ] -# tcp flags & (fin | syn | rst | ack) != (syn | ack) +# tcp flags & (syn | ack) == syn | ack [ { "match": { @@ -1754,14 +1754,12 @@ } }, [ - "fin", "syn", - "rst", "ack" ] ] }, - "op": "!=", + "op": "==", "right": [ "syn", "ack" @@ -1770,7 +1768,7 @@ } ] -# tcp flags & (syn | ack) == (syn | ack) +# tcp flags & (fin | syn | rst | ack) != syn | ack [ { "match": { @@ -1782,17 +1780,31 @@ "protocol": "tcp" } }, - [ - "syn", - "ack" - ] + { + "|": [ + { + "|": [ + { + "|": [ + "fin", + "syn" + ] + }, + "rst" + ] + }, + "ack" + ] + } ] }, - "op": "==", - "right": [ - "syn", - "ack" - ] + "op": "!=", + "right": { + "|": [ + "syn", + "ack" + ] + } } } ] |