summaryrefslogtreecommitdiffstats
path: root/tests/py/any/ct.t.payload
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2025-02-17 10:23:24 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2025-02-21 23:23:16 +0100
commit50741c52fe57fd09fa9cbd1a1626bfdd2f4115d8 (patch)
treea646a07e43d8f6de2ccec8b4d5ed4c5954618fdc /tests/py/any/ct.t.payload
parent347039f64509e77ad5f6ef52ae70950c91886f8e (diff)
netlink_linearize: use range expression for OP_EQ and OP_IMPLICIT
range expression is available since v4.9-rc1~127^2~67^2~3, replace the two cmp expression when generating netlink bytecode. Code to delinearize the two cmp expressions to represent the range remains in place for backwards compatibility. The delinearize path to parse range expressions with NFT_OP_EQ is already present since: 3ed932917cc7 ("src: use new range expression for != [a,b] intervals") Update tests/py payload accordingly, json tests need no update since they already use the range to represent them. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/any/ct.t.payload')
-rw-r--r--tests/py/any/ct.t.payload9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload
index 14385cf7..60160094 100644
--- a/tests/py/any/ct.t.payload
+++ b/tests/py/any/ct.t.payload
@@ -172,8 +172,7 @@ ip test-ip4 output
ip test-ip4 output
[ ct load mark => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ cmp gte reg 1 0x32000000 ]
- [ cmp lte reg 1 0x45000000 ]
+ [ range eq reg 1 0x32000000 0x45000000 ]
# ct mark != 0x00000032-0x00000045
ip test-ip4 output
@@ -240,8 +239,7 @@ ip test-ip4 output
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ cmp gte reg 1 0x60ea0000 ]
- [ cmp lte reg 1 0x80ee3600 ]
+ [ range eq reg 1 0x60ea0000 0x80ee3600 ]
# ct expiration > 4d23h59m59s
ip test-ip4 output
@@ -258,8 +256,7 @@ ip test-ip4 output
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ byteorder reg 1 = hton(reg 1, 4, 4) ]
- [ cmp gte reg 1 0xe8800000 ]
- [ cmp lte reg 1 0xc8af0000 ]
+ [ range eq reg 1 0xe8800000 0xc8af0000 ]
# ct expiration != 33-45
ip test-ip4 output