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/ip/snat.t.payload | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/py/ip/snat.t.payload') diff --git a/tests/py/ip/snat.t.payload b/tests/py/ip/snat.t.payload index bef97a85..3d828a38 100644 --- a/tests/py/ip/snat.t.payload +++ b/tests/py/ip/snat.t.payload @@ -17,8 +17,7 @@ ip test-ip4 postrouting [ payload load 1b @ network header + 9 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] - [ cmp lt reg 1 0x00005000 ] - [ cmp gt reg 1 0x00005a00 ] + [ range neq reg 1 0x00005000 0x00005a00 ] [ immediate reg 1 0x0203a8c0 ] [ nat snat ip addr_min reg 1 addr_max reg 0 ] @@ -43,8 +42,7 @@ ip test-ip4 postrouting [ payload load 1b @ network header + 9 => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] - [ cmp lt reg 1 0x00001700 ] - [ cmp gt reg 1 0x00002200 ] + [ range neq reg 1 0x00001700 0x00002200 ] [ immediate reg 1 0x0203a8c0 ] [ nat snat ip addr_min reg 1 addr_max reg 0 ] -- cgit v1.2.3