diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-02-17 10:23:24 +0100 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-02-21 23:23:16 +0100 |
| commit | 50741c52fe57fd09fa9cbd1a1626bfdd2f4115d8 (patch) | |
| tree | a646a07e43d8f6de2ccec8b4d5ed4c5954618fdc /tests/py/ip6/rt.t.payload.ip6 | |
| parent | 347039f64509e77ad5f6ef52ae70950c91886f8e (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/ip6/rt.t.payload.ip6')
| -rw-r--r-- | tests/py/ip6/rt.t.payload.ip6 | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/py/ip6/rt.t.payload.ip6 b/tests/py/ip6/rt.t.payload.ip6 index c7b52f82..2b40159b 100644 --- a/tests/py/ip6/rt.t.payload.ip6 +++ b/tests/py/ip6/rt.t.payload.ip6 @@ -47,8 +47,7 @@ ip6 test-ip6 input # rt nexthdr 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 43 + 0 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # rt nexthdr != 33-45 ip6 test-ip6 input @@ -84,8 +83,7 @@ ip6 test-ip6 input # rt hdrlength 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 43 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # rt hdrlength != 33-45 ip6 test-ip6 input @@ -121,8 +119,7 @@ ip6 test-ip6 input # rt type 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 43 + 2 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # rt type != 33-45 ip6 test-ip6 input @@ -158,8 +155,7 @@ ip6 test-ip6 input # rt seg-left 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 43 + 3 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # rt seg-left != 33-45 ip6 test-ip6 input |
