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 | |
| 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')
| -rw-r--r-- | tests/py/ip6/dnat.t.payload.ip6 | 9 | ||||
| -rw-r--r-- | tests/py/ip6/dst.t.payload.inet | 6 | ||||
| -rw-r--r-- | tests/py/ip6/dst.t.payload.ip6 | 6 | ||||
| -rw-r--r-- | tests/py/ip6/frag.t.payload.inet | 9 | ||||
| -rw-r--r-- | tests/py/ip6/frag.t.payload.ip6 | 9 | ||||
| -rw-r--r-- | tests/py/ip6/frag.t.payload.netdev | 9 | ||||
| -rw-r--r-- | tests/py/ip6/hbh.t.payload.inet | 6 | ||||
| -rw-r--r-- | tests/py/ip6/hbh.t.payload.ip6 | 6 | ||||
| -rw-r--r-- | tests/py/ip6/icmpv6.t.payload.ip6 | 18 | ||||
| -rw-r--r-- | tests/py/ip6/ip6.t.payload.inet | 9 | ||||
| -rw-r--r-- | tests/py/ip6/ip6.t.payload.ip6 | 9 | ||||
| -rw-r--r-- | tests/py/ip6/masquerade.t.payload.ip6 | 3 | ||||
| -rw-r--r-- | tests/py/ip6/mh.t.payload.inet | 12 | ||||
| -rw-r--r-- | tests/py/ip6/mh.t.payload.ip6 | 12 | ||||
| -rw-r--r-- | tests/py/ip6/redirect.t.payload.ip6 | 3 | ||||
| -rw-r--r-- | tests/py/ip6/rt.t.payload.inet | 12 | ||||
| -rw-r--r-- | tests/py/ip6/rt.t.payload.ip6 | 12 | ||||
| -rw-r--r-- | tests/py/ip6/snat.t.payload.ip6 | 6 |
18 files changed, 52 insertions, 104 deletions
diff --git a/tests/py/ip6/dnat.t.payload.ip6 b/tests/py/ip6/dnat.t.payload.ip6 index 004ffdeb..fe6e0422 100644 --- a/tests/py/ip6/dnat.t.payload.ip6 +++ b/tests/py/ip6/dnat.t.payload.ip6 @@ -3,8 +3,7 @@ ip6 test-ip6 prerouting [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] - [ cmp gte reg 1 0x00005000 ] - [ cmp lte reg 1 0x00005a00 ] + [ range eq reg 1 0x00005000 0x00005a00 ] [ immediate reg 1 0x38080120 0x01005f03 0x00000000 0x00000000 ] [ immediate reg 2 0x38080120 0x02005f03 0x00000000 0x00000000 ] [ immediate reg 3 0x00005000 ] @@ -16,8 +15,7 @@ ip6 test-ip6 prerouting [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] - [ cmp gte reg 1 0x00005000 ] - [ cmp lte reg 1 0x00005a00 ] + [ range eq reg 1 0x00005000 0x00005a00 ] [ immediate reg 1 0x38080120 0x01005f03 0x00000000 0x00000000 ] [ immediate reg 2 0x38080120 0x02005f03 0x00000000 0x00000000 ] [ immediate reg 3 0x00006400 ] @@ -28,8 +26,7 @@ ip6 test-ip6 prerouting [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] - [ cmp gte reg 1 0x00005000 ] - [ cmp lte reg 1 0x00005a00 ] + [ range eq reg 1 0x00005000 0x00005a00 ] [ immediate reg 1 0x38080120 0x01005f03 0x00000000 0x00000000 ] [ immediate reg 2 0x00005000 ] [ nat dnat ip6 addr_min reg 1 proto_min reg 2 flags 0x2 ] diff --git a/tests/py/ip6/dst.t.payload.inet b/tests/py/ip6/dst.t.payload.inet index 90d6bda1..476fdbcd 100644 --- a/tests/py/ip6/dst.t.payload.inet +++ b/tests/py/ip6/dst.t.payload.inet @@ -17,8 +17,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 1b @ 60 + 0 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # dst nexthdr != 33-45 inet test-inet input @@ -100,8 +99,7 @@ ip6 test-ip6 input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 1b @ 60 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # dst hdrlength != 33-45 ip6 test-ip6 input diff --git a/tests/py/ip6/dst.t.payload.ip6 b/tests/py/ip6/dst.t.payload.ip6 index 941140d0..af3bab9b 100644 --- a/tests/py/ip6/dst.t.payload.ip6 +++ b/tests/py/ip6/dst.t.payload.ip6 @@ -11,8 +11,7 @@ ip6 test-ip6 input # dst nexthdr 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 60 + 0 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # dst nexthdr != 33-45 ip6 test-ip6 input @@ -74,8 +73,7 @@ ip6 test-ip6 input # dst hdrlength 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 60 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # dst hdrlength != 33-45 ip6 test-ip6 input diff --git a/tests/py/ip6/frag.t.payload.inet b/tests/py/ip6/frag.t.payload.inet index 20334f44..1100896e 100644 --- a/tests/py/ip6/frag.t.payload.inet +++ b/tests/py/ip6/frag.t.payload.inet @@ -65,8 +65,7 @@ inet test-inet output [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 1b @ 44 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # frag reserved != 33-45 inet test-inet output @@ -117,8 +116,7 @@ inet test-inet output [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 2b @ 44 + 2 => reg 1 ] [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ] - [ cmp gte reg 1 0x00000801 ] - [ cmp lte reg 1 0x00006801 ] + [ range eq reg 1 0x00000801 0x00006801 ] # frag frag-off != 33-45 inet test-inet output @@ -176,8 +174,7 @@ inet test-inet output [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 4b @ 44 + 4 => reg 1 ] - [ cmp gte reg 1 0x21000000 ] - [ cmp lte reg 1 0x2d000000 ] + [ range eq reg 1 0x21000000 0x2d000000 ] # frag id != 33-45 inet test-inet output diff --git a/tests/py/ip6/frag.t.payload.ip6 b/tests/py/ip6/frag.t.payload.ip6 index 7c3e7a4e..0556395a 100644 --- a/tests/py/ip6/frag.t.payload.ip6 +++ b/tests/py/ip6/frag.t.payload.ip6 @@ -47,8 +47,7 @@ ip6 test-ip6 output # frag reserved 33-45 ip6 test-ip6 output [ exthdr load ipv6 1b @ 44 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # frag reserved != 33-45 ip6 test-ip6 output @@ -87,8 +86,7 @@ ip6 test-ip6 output ip6 test-ip6 output [ exthdr load ipv6 2b @ 44 + 2 => reg 1 ] [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ] - [ cmp gte reg 1 0x00000801 ] - [ cmp lte reg 1 0x00006801 ] + [ range eq reg 1 0x00000801 0x00006801 ] # frag frag-off != 33-45 ip6 test-ip6 output @@ -132,8 +130,7 @@ ip6 test-ip6 output # frag id 33-45 ip6 test-ip6 output [ exthdr load ipv6 4b @ 44 + 4 => reg 1 ] - [ cmp gte reg 1 0x21000000 ] - [ cmp lte reg 1 0x2d000000 ] + [ range eq reg 1 0x21000000 0x2d000000 ] # frag id != 33-45 ip6 test-ip6 output diff --git a/tests/py/ip6/frag.t.payload.netdev b/tests/py/ip6/frag.t.payload.netdev index 05620754..68257f5b 100644 --- a/tests/py/ip6/frag.t.payload.netdev +++ b/tests/py/ip6/frag.t.payload.netdev @@ -65,8 +65,7 @@ netdev test-netdev ingress [ meta load protocol => reg 1 ] [ cmp eq reg 1 0x0000dd86 ] [ exthdr load ipv6 1b @ 44 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # frag reserved != 33-45 netdev test-netdev ingress @@ -117,8 +116,7 @@ netdev test-netdev ingress [ cmp eq reg 1 0x0000dd86 ] [ exthdr load ipv6 2b @ 44 + 2 => reg 1 ] [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ] - [ cmp gte reg 1 0x00000801 ] - [ cmp lte reg 1 0x00006801 ] + [ range eq reg 1 0x00000801 0x00006801 ] # frag frag-off != 33-45 netdev test-netdev ingress @@ -200,8 +198,7 @@ netdev test-netdev ingress [ meta load protocol => reg 1 ] [ cmp eq reg 1 0x0000dd86 ] [ exthdr load ipv6 4b @ 44 + 4 => reg 1 ] - [ cmp gte reg 1 0x21000000 ] - [ cmp lte reg 1 0x2d000000 ] + [ range eq reg 1 0x21000000 0x2d000000 ] # frag id != 33-45 netdev test-netdev ingress diff --git a/tests/py/ip6/hbh.t.payload.inet b/tests/py/ip6/hbh.t.payload.inet index 63afd832..10f010aa 100644 --- a/tests/py/ip6/hbh.t.payload.inet +++ b/tests/py/ip6/hbh.t.payload.inet @@ -17,8 +17,7 @@ inet test-inet filter-input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 1b @ 0 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # hbh hdrlength != 33-45 inet test-inet filter-input @@ -86,8 +85,7 @@ inet test-inet filter-input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 1b @ 0 + 0 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # hbh nexthdr != 33-45 inet test-inet filter-input diff --git a/tests/py/ip6/hbh.t.payload.ip6 b/tests/py/ip6/hbh.t.payload.ip6 index 913505a5..a6bc7ae6 100644 --- a/tests/py/ip6/hbh.t.payload.ip6 +++ b/tests/py/ip6/hbh.t.payload.ip6 @@ -11,8 +11,7 @@ ip6 test-ip6 filter-input # hbh hdrlength 33-45 ip6 test-ip6 filter-input [ exthdr load ipv6 1b @ 0 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # hbh hdrlength != 33-45 ip6 test-ip6 filter-input @@ -64,8 +63,7 @@ ip6 test-ip6 filter-input # hbh nexthdr 33-45 ip6 test-ip6 filter-input [ exthdr load ipv6 1b @ 0 + 0 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # hbh nexthdr != 33-45 ip6 test-ip6 filter-input diff --git a/tests/py/ip6/icmpv6.t.payload.ip6 b/tests/py/ip6/icmpv6.t.payload.ip6 index 5b6035d1..8a637afa 100644 --- a/tests/py/ip6/icmpv6.t.payload.ip6 +++ b/tests/py/ip6/icmpv6.t.payload.ip6 @@ -206,8 +206,7 @@ ip6 test-ip6 input [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x0000003a ] [ payload load 1b @ transport header + 1 => reg 1 ] - [ cmp gte reg 1 0x00000003 ] - [ cmp lte reg 1 0x00000042 ] + [ range eq reg 1 0x00000003 0x00000042 ] # icmpv6 code {5, 6, 7} accept __set%d test-ip6 3 @@ -252,8 +251,7 @@ ip6 test-ip6 input [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x0000003a ] [ payload load 2b @ transport header + 2 => reg 1 ] - [ cmp gte reg 1 0x0000de00 ] - [ cmp lte reg 1 0x0000e200 ] + [ range eq reg 1 0x0000de00 0x0000e200 ] # icmpv6 checksum != 222-226 ip6 @@ -307,8 +305,7 @@ ip6 test-ip6 input [ payload load 1b @ transport header + 0 => reg 1 ] [ cmp eq reg 1 0x00000002 ] [ payload load 4b @ transport header + 4 => reg 1 ] - [ cmp gte reg 1 0x21000000 ] - [ cmp lte reg 1 0x2d000000 ] + [ range eq reg 1 0x21000000 0x2d000000 ] # icmpv6 mtu != 33-45 ip6 test-ip6 input @@ -362,8 +359,7 @@ ip6 test-ip6 input [ payload load 1b @ transport header + 0 => reg 1 ] [ lookup reg 1 set __set%d ] [ payload load 2b @ transport header + 4 => reg 1 ] - [ cmp gte reg 1 0x00002100 ] - [ cmp lte reg 1 0x00002d00 ] + [ range eq reg 1 0x00002100 0x00002d00 ] # icmpv6 id != 33-45 __set%d test-ip6 3 @@ -496,8 +492,7 @@ ip6 test-ip6 input [ payload load 1b @ transport header + 0 => reg 1 ] [ lookup reg 1 set __set%d ] [ payload load 2b @ transport header + 6 => reg 1 ] - [ cmp gte reg 1 0x00000200 ] - [ cmp lte reg 1 0x00000400 ] + [ range eq reg 1 0x00000200 0x00000400 ] # icmpv6 sequence != 2-4 __set%d test-ip6 3 @@ -518,8 +513,7 @@ ip6 test-ip6 input [ payload load 1b @ transport header + 0 => reg 1 ] [ cmp eq reg 1 0x00000082 ] [ payload load 2b @ transport header + 4 => reg 1 ] - [ cmp gte reg 1 0x00002100 ] - [ cmp lte reg 1 0x00002d00 ] + [ range eq reg 1 0x00002100 0x00002d00 ] # icmpv6 max-delay != 33-45 ip6 test-ip6 input diff --git a/tests/py/ip6/ip6.t.payload.inet b/tests/py/ip6/ip6.t.payload.inet index dbb430af..f0c1843d 100644 --- a/tests/py/ip6/ip6.t.payload.inet +++ b/tests/py/ip6/ip6.t.payload.inet @@ -165,8 +165,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ payload load 2b @ network header + 4 => reg 1 ] - [ cmp gte reg 1 0x00002100 ] - [ cmp lte reg 1 0x00002d00 ] + [ range eq reg 1 0x00002100 0x00002d00 ] # ip6 length != 33-45 inet test-inet input @@ -244,8 +243,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ payload load 1b @ network header + 6 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002c ] + [ range eq reg 1 0x00000021 0x0000002c ] # ip6 nexthdr != 33-44 inet test-inet input @@ -273,8 +271,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ payload load 1b @ network header + 7 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # ip6 hoplimit != 33-45 inet test-inet input diff --git a/tests/py/ip6/ip6.t.payload.ip6 b/tests/py/ip6/ip6.t.payload.ip6 index b1289232..5118d4f2 100644 --- a/tests/py/ip6/ip6.t.payload.ip6 +++ b/tests/py/ip6/ip6.t.payload.ip6 @@ -129,8 +129,7 @@ ip6 test-ip6 input # ip6 length 33-45 ip6 test-ip6 input [ payload load 2b @ network header + 4 => reg 1 ] - [ cmp gte reg 1 0x00002100 ] - [ cmp lte reg 1 0x00002d00 ] + [ range eq reg 1 0x00002100 0x00002d00 ] # ip6 length != 33-45 ip6 test-ip6 input @@ -190,8 +189,7 @@ ip6 test-ip6 input # ip6 nexthdr 33-44 ip6 test-ip6 input [ payload load 1b @ network header + 6 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002c ] + [ range eq reg 1 0x00000021 0x0000002c ] # ip6 nexthdr != 33-44 ip6 test-ip6 input @@ -211,8 +209,7 @@ ip6 test-ip6 input # ip6 hoplimit 33-45 ip6 test-ip6 input [ payload load 1b @ network header + 7 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # ip6 hoplimit != 33-45 ip6 test-ip6 input diff --git a/tests/py/ip6/masquerade.t.payload.ip6 b/tests/py/ip6/masquerade.t.payload.ip6 index 43ae2ae4..086a6dda 100644 --- a/tests/py/ip6/masquerade.t.payload.ip6 +++ b/tests/py/ip6/masquerade.t.payload.ip6 @@ -100,8 +100,7 @@ ip6 test-ip6 postrouting # ip6 daddr fe00::1-fe00::200 udp dport 53 counter masquerade ip6 test-ip6 postrouting [ payload load 16b @ network header + 24 => reg 1 ] - [ cmp gte reg 1 0x000000fe 0x00000000 0x00000000 0x01000000 ] - [ cmp lte reg 1 0x000000fe 0x00000000 0x00000000 0x00020000 ] + [ range eq reg 1 0x000000fe 0x00000000 0x00000000 0x01000000 0x000000fe 0x00000000 0x00000000 0x00020000 ] [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] diff --git a/tests/py/ip6/mh.t.payload.inet b/tests/py/ip6/mh.t.payload.inet index 54eaa70e..7ab9b75c 100644 --- a/tests/py/ip6/mh.t.payload.inet +++ b/tests/py/ip6/mh.t.payload.inet @@ -65,8 +65,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 1b @ 135 + 0 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # mh nexthdr != 33-45 inet test-inet input @@ -114,8 +113,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 1b @ 135 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # mh hdrlength != 33-45 inet test-inet input @@ -187,8 +185,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 1b @ 135 + 3 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # mh reserved != 33-45 inet test-inet input @@ -236,8 +233,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ exthdr load ipv6 2b @ 135 + 4 => reg 1 ] - [ cmp gte reg 1 0x00002100 ] - [ cmp lte reg 1 0x00002d00 ] + [ range eq reg 1 0x00002100 0x00002d00 ] # mh checksum != 33-45 inet test-inet input diff --git a/tests/py/ip6/mh.t.payload.ip6 b/tests/py/ip6/mh.t.payload.ip6 index 73bd4226..7edde6e8 100644 --- a/tests/py/ip6/mh.t.payload.ip6 +++ b/tests/py/ip6/mh.t.payload.ip6 @@ -47,8 +47,7 @@ ip6 test-ip6 input # mh nexthdr 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 135 + 0 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # mh nexthdr != 33-45 ip6 test-ip6 input @@ -84,8 +83,7 @@ ip6 test-ip6 input # mh hdrlength 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 135 + 1 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # mh hdrlength != 33-45 ip6 test-ip6 input @@ -139,8 +137,7 @@ ip6 test-ip6 input # mh reserved 33-45 ip6 test-ip6 input [ exthdr load ipv6 1b @ 135 + 3 => reg 1 ] - [ cmp gte reg 1 0x00000021 ] - [ cmp lte reg 1 0x0000002d ] + [ range eq reg 1 0x00000021 0x0000002d ] # mh reserved != 33-45 ip6 test-ip6 input @@ -176,8 +173,7 @@ ip6 test-ip6 input # mh checksum 33-45 ip6 test-ip6 input [ exthdr load ipv6 2b @ 135 + 4 => reg 1 ] - [ cmp gte reg 1 0x00002100 ] - [ cmp lte reg 1 0x00002d00 ] + [ range eq reg 1 0x00002100 0x00002d00 ] # mh checksum != 33-45 ip6 test-ip6 input diff --git a/tests/py/ip6/redirect.t.payload.ip6 b/tests/py/ip6/redirect.t.payload.ip6 index cfc29013..832c51da 100644 --- a/tests/py/ip6/redirect.t.payload.ip6 +++ b/tests/py/ip6/redirect.t.payload.ip6 @@ -166,8 +166,7 @@ ip6 test-ip6 output # ip6 daddr fe00::1-fe00::200 udp dport 53 counter redirect ip6 test-ip6 output [ payload load 16b @ network header + 24 => reg 1 ] - [ cmp gte reg 1 0x000000fe 0x00000000 0x00000000 0x01000000 ] - [ cmp lte reg 1 0x000000fe 0x00000000 0x00000000 0x00020000 ] + [ range eq reg 1 0x000000fe 0x00000000 0x00000000 0x01000000 0x000000fe 0x00000000 0x00000000 0x00020000 ] [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] diff --git a/tests/py/ip6/rt.t.payload.inet b/tests/py/ip6/rt.t.payload.inet index 864d3114..6549ab78 100644 --- a/tests/py/ip6/rt.t.payload.inet +++ b/tests/py/ip6/rt.t.payload.inet @@ -65,8 +65,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ 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 inet test-inet input @@ -114,8 +113,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ 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 inet test-inet input @@ -163,8 +161,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ 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 inet test-inet input @@ -212,8 +209,7 @@ inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ 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 inet test-inet input 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 diff --git a/tests/py/ip6/snat.t.payload.ip6 b/tests/py/ip6/snat.t.payload.ip6 index 66a29672..96a9ba0a 100644 --- a/tests/py/ip6/snat.t.payload.ip6 +++ b/tests/py/ip6/snat.t.payload.ip6 @@ -3,8 +3,7 @@ ip6 test-ip6 postrouting [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] - [ cmp gte reg 1 0x00005000 ] - [ cmp lte reg 1 0x00005a00 ] + [ range eq reg 1 0x00005000 0x00005a00 ] [ immediate reg 1 0x38080120 0x01005f03 0x00000000 0x00000000 ] [ immediate reg 2 0x38080120 0x02005f03 0x00000000 0x00000000 ] [ immediate reg 3 0x00005000 ] @@ -16,8 +15,7 @@ ip6 test-ip6 postrouting [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] - [ cmp gte reg 1 0x00005000 ] - [ cmp lte reg 1 0x00005a00 ] + [ range eq reg 1 0x00005000 0x00005a00 ] [ immediate reg 1 0x38080120 0x01005f03 0x00000000 0x00000000 ] [ immediate reg 2 0x38080120 0x02005f03 0x00000000 0x00000000 ] [ immediate reg 3 0x00006400 ] |
