From 5be698396c6b2b71c5d5f11fe2b66ec362e454bf Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 14 Mar 2023 10:29:59 +0100 Subject: Revert "evaluate: relax type-checking for integer arguments in mark statements" This patch reverts eab3eb7f146c ("evaluate: relax type-checking for integer arguments in mark statements") since it might cause ruleset portability issues when moving a ruleset from little to big endian host (and vice-versa). Let's revert this until we agree on what to do in this case. Signed-off-by: Pablo Neira Ayuso --- tests/py/ip/meta.t | 2 -- tests/py/ip/meta.t.json | 20 -------------------- tests/py/ip/meta.t.payload | 8 -------- 3 files changed, 30 deletions(-) (limited to 'tests/py') diff --git a/tests/py/ip/meta.t b/tests/py/ip/meta.t index 85eaf54c..5a05923a 100644 --- a/tests/py/ip/meta.t +++ b/tests/py/ip/meta.t @@ -15,5 +15,3 @@ meta obrname "br0";fail meta sdif "lo" accept;ok meta sdifname != "vrf1" accept;ok - -meta mark set ip dscp;ok diff --git a/tests/py/ip/meta.t.json b/tests/py/ip/meta.t.json index a93d7e78..3df31ce3 100644 --- a/tests/py/ip/meta.t.json +++ b/tests/py/ip/meta.t.json @@ -156,23 +156,3 @@ } } ] - -# meta mark set ip dscp -[ - { - "mangle": { - "key": { - "meta": { - "key": "mark" - } - }, - "value": { - "payload": { - "field": "dscp", - "protocol": "ip" - } - } - } - } -] - diff --git a/tests/py/ip/meta.t.payload b/tests/py/ip/meta.t.payload index 1aa8d003..afde5cc1 100644 --- a/tests/py/ip/meta.t.payload +++ b/tests/py/ip/meta.t.payload @@ -51,11 +51,3 @@ ip test-ip4 input [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00004300 ] - -# meta mark set ip dscp -ip test-ip4 input - [ payload load 1b @ network header + 1 => reg 1 ] - [ bitwise reg 1 = ( reg 1 & 0x000000fc ) ^ 0x00000000 ] - [ bitwise reg 1 = ( reg 1 >> 0x00000002 ) ] - [ meta set mark with reg 1 ] - -- cgit v1.2.3