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/mh.t.payload.ip6 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tests/py/ip6/mh.t.payload.ip6') diff --git a/tests/py/ip6/mh.t.payload.ip6 b/tests/py/ip6/mh.t.payload.ip6 index d5366a54..7a9aa35a 100644 --- a/tests/py/ip6/mh.t.payload.ip6 +++ b/tests/py/ip6/mh.t.payload.ip6 @@ -45,8 +45,7 @@ ip6 test-ip6 input # mh nexthdr != 33-45 ip6 test-ip6 input [ exthdr load 1b @ 135 + 0 => reg 1 ] - [ cmp lt reg 1 0x00000021 ] - [ cmp gt reg 1 0x0000002d ] + [ range neq reg 1 0x00000021 0x0000002d ] # mh nexthdr { 33, 55, 67, 88 } __set%d test-ip6 3 @@ -83,8 +82,7 @@ ip6 test-ip6 input # mh hdrlength != 33-45 ip6 test-ip6 input [ exthdr load 1b @ 135 + 1 => reg 1 ] - [ cmp lt reg 1 0x00000021 ] - [ cmp gt reg 1 0x0000002d ] + [ range neq reg 1 0x00000021 0x0000002d ] # mh hdrlength { 33, 55, 67, 88 } __set%d test-ip6 3 @@ -139,8 +137,7 @@ ip6 test-ip6 input # mh reserved != 33-45 ip6 test-ip6 input [ exthdr load 1b @ 135 + 3 => reg 1 ] - [ cmp lt reg 1 0x00000021 ] - [ cmp gt reg 1 0x0000002d ] + [ range neq reg 1 0x00000021 0x0000002d ] # mh reserved { 33, 55, 67, 88} __set%d test-ip6 3 @@ -177,8 +174,7 @@ ip6 test-ip6 input # mh checksum != 33-45 ip6 test-ip6 input [ exthdr load 2b @ 135 + 4 => reg 1 ] - [ cmp lt reg 1 0x00002100 ] - [ cmp gt reg 1 0x00002d00 ] + [ range neq reg 1 0x00002100 0x00002d00 ] # mh checksum { 33, 55, 67, 88} __set%d test-ip6 3 -- cgit v1.2.3