From 3ed932917cc744b489bd2706a55a1778b0b50c0e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 20 Sep 2016 19:25:25 +0200 Subject: src: use new range expression for != [a,b] intervals Use new range expression in the kernel to fix wrong bytecode generation. This patch also adjust tests so we don't hit problems there. Signed-off-by: Pablo Neira Ayuso --- tests/py/ip6/ip6.t.payload.ip6 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tests/py/ip6/ip6.t.payload.ip6') diff --git a/tests/py/ip6/ip6.t.payload.ip6 b/tests/py/ip6/ip6.t.payload.ip6 index 422fabdb..56ed8bd4 100644 --- a/tests/py/ip6/ip6.t.payload.ip6 +++ b/tests/py/ip6/ip6.t.payload.ip6 @@ -80,8 +80,7 @@ ip6 test-ip6 input # ip6 length != 33-45 ip6 test-ip6 input [ payload load 2b @ network header + 4 => reg 1 ] - [ cmp lt reg 1 0x00002100 ] - [ cmp gt reg 1 0x00002d00 ] + [ range neq reg 1 0x00002100 0x00002d00 ] # ip6 length { 33-55} __set%d test-ip6 7 @@ -134,8 +133,7 @@ ip6 test-ip6 input # ip6 nexthdr != 33-44 ip6 test-ip6 input [ payload load 1b @ network header + 6 => reg 1 ] - [ cmp lt reg 1 0x00000021 ] - [ cmp gt reg 1 0x0000002c ] + [ range neq reg 1 0x00000021 0x0000002c ] # ip6 hoplimit 1 ip6 test-ip6 input @@ -156,8 +154,7 @@ ip6 test-ip6 input # ip6 hoplimit != 33-45 ip6 test-ip6 input [ payload load 1b @ network header + 7 => reg 1 ] - [ cmp lt reg 1 0x00000021 ] - [ cmp gt reg 1 0x0000002d ] + [ range neq reg 1 0x00000021 0x0000002d ] # ip6 hoplimit {33, 55, 67, 88} __set%d test-ip6 3 @@ -376,8 +373,7 @@ ip6 test-ip6 input # ip6 daddr != ::1234:1234:1234:1234:1234:1234:1234-1234:1234::1234:1234:1234:1234:1234 ip6 test-ip6 input [ payload load 16b @ network header + 24 => reg 1 ] - [ cmp lt reg 1 0x34120000 0x34123412 0x34123412 0x34123412 ] - [ cmp gt reg 1 0x34123412 0x34120000 0x34123412 0x34123412 ] + [ range neq reg 1 0x34120000 0x34123412 0x34123412 0x34123412 0x34123412 0x34120000 0x34123412 0x34123412 ] # iif "lo" ip6 daddr set ::1 ip6 test-ip6 input -- cgit v1.2.3