summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/icmp.t.payload.ip
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-09-20 19:25:25 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-10-17 17:55:56 +0200
commit3ed932917cc744b489bd2706a55a1778b0b50c0e (patch)
tree96f226969cab52a9c29510378612751713f78d98 /tests/py/ip/icmp.t.payload.ip
parentf55ccf9ea1061f8e50065c0cc6b3ed93523f0b97 (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip/icmp.t.payload.ip')
-rw-r--r--tests/py/ip/icmp.t.payload.ip18
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/py/ip/icmp.t.payload.ip b/tests/py/ip/icmp.t.payload.ip
index 32f26852..c7df75db 100644
--- a/tests/py/ip/icmp.t.payload.ip
+++ b/tests/py/ip/icmp.t.payload.ip
@@ -142,8 +142,7 @@ ip test-ip4 input
[ payload load 1b @ network header + 9 => reg 1 ]
[ cmp eq reg 1 0x00000001 ]
[ payload load 1b @ transport header + 1 => reg 1 ]
- [ cmp lt reg 1 0x00000021 ]
- [ cmp gt reg 1 0x00000037 ]
+ [ range neq reg 1 0x00000021 0x00000037 ]
# icmp code { 33-55}
__set%d test-ip4 7
@@ -195,8 +194,7 @@ ip test-ip4 input
[ payload load 1b @ network header + 9 => reg 1 ]
[ cmp eq reg 1 0x00000001 ]
[ payload load 2b @ transport header + 2 => reg 1 ]
- [ cmp lt reg 1 0x00000b00 ]
- [ cmp gt reg 1 0x00005701 ]
+ [ range neq reg 1 0x00000b00 0x00005701 ]
[ immediate reg 0 accept ]
# icmp checksum { 11-343} accept
@@ -256,8 +254,7 @@ ip test-ip4 input
[ payload load 1b @ network header + 9 => reg 1 ]
[ cmp eq reg 1 0x00000001 ]
[ payload load 2b @ transport header + 4 => reg 1 ]
- [ cmp lt reg 1 0x00002100 ]
- [ cmp gt reg 1 0x00002d00 ]
+ [ range neq reg 1 0x00002100 0x00002d00 ]
# icmp id { 33-55}
__set%d test-ip4 7
@@ -306,8 +303,7 @@ ip test-ip4 input
[ payload load 1b @ network header + 9 => reg 1 ]
[ cmp eq reg 1 0x00000001 ]
[ payload load 2b @ transport header + 6 => reg 1 ]
- [ cmp lt reg 1 0x00002100 ]
- [ cmp gt reg 1 0x00002d00 ]
+ [ range neq reg 1 0x00002100 0x00002d00 ]
# icmp sequence { 33, 55, 67, 88}
__set%d test-ip4 3
@@ -381,8 +377,7 @@ ip test-ip4 input
[ payload load 1b @ network header + 9 => reg 1 ]
[ cmp eq reg 1 0x00000001 ]
[ payload load 2b @ transport header + 6 => reg 1 ]
- [ cmp lt reg 1 0x00002100 ]
- [ cmp gt reg 1 0x00002d00 ]
+ [ range neq reg 1 0x00002100 0x00002d00 ]
# icmp mtu { 33, 55, 67, 88}
__set%d test-ip4 3
@@ -431,8 +426,7 @@ ip test-ip4 input
[ payload load 1b @ network header + 9 => reg 1 ]
[ cmp eq reg 1 0x00000001 ]
[ payload load 4b @ transport header + 4 => reg 1 ]
- [ cmp lt reg 1 0x21000000 ]
- [ cmp gt reg 1 0x2d000000 ]
+ [ range neq reg 1 0x21000000 0x2d000000 ]
# icmp gateway { 33, 55, 67, 88}
__set%d test-ip4 3