From 1441728b56f3ed8288b7b3bab0422adf1f90cecc Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sun, 24 Jan 2016 13:29:55 +0100 Subject: tests: add two map test cases One normal map lookup, one with an explicit binop. The latter is supposed to also work with the followup patch applied. Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- tests/py/inet/map.t.payload.ip | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/py/inet/map.t.payload.ip (limited to 'tests/py/inet/map.t.payload.ip') diff --git a/tests/py/inet/map.t.payload.ip b/tests/py/inet/map.t.payload.ip new file mode 100644 index 00000000..54b9583a --- /dev/null +++ b/tests/py/inet/map.t.payload.ip @@ -0,0 +1,9 @@ +# mark set ip saddr map { 10.2.3.2 : 0x0000002a, 10.2.3.1 : 0x00000017} +map%d test-ip b +map%d test-ip 0 + element 0103020a : 00000017 0 [end] element 0203020a : 0000002a 0 [end] +ip test-ip input + [ payload load 4b @ network header + 12 => reg 1 ] + [ lookup reg 1 set map%d dreg 1 ] + [ meta set mark with reg 1 ] + -- cgit v1.2.3