diff options
author | Florian Westphal <fw@strlen.de> | 2016-01-24 13:37:10 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2016-01-26 14:31:30 +0100 |
commit | 7ecca3b785a67c5783ca61119d4490963837b0f0 (patch) | |
tree | 26b3eb2da217dbf6b76e0067b9c0506dadc9caff /tests/py/inet/map.t.payload.netdev | |
parent | 1441728b56f3ed8288b7b3bab0422adf1f90cecc (diff) |
netlink: do binop postprocessing also for map lookups
old nft list:
mark set unknown unknown & 0xfff [invalid type] map { 3 : 0x00000017, 1 : 0x0000002a}
new:
mark set vlan id map { 3 : 0x00000017, 1 : 0x0000002a}
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/inet/map.t.payload.netdev')
-rw-r--r-- | tests/py/inet/map.t.payload.netdev | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/py/inet/map.t.payload.netdev b/tests/py/inet/map.t.payload.netdev index 27a3ca8f..fb9260cb 100644 --- a/tests/py/inet/map.t.payload.netdev +++ b/tests/py/inet/map.t.payload.netdev @@ -9,3 +9,15 @@ netdev test-netdev ingress [ lookup reg 1 set map%d dreg 1 ] [ meta set mark with reg 1 ] +# mark set ip hdrlength map { 5 : 0x00000017, 4 : 0x00000001} +map%d test-netdev b +map%d test-netdev 0 + element 00000005 : 00000017 0 [end] element 00000004 : 00000001 0 [end] +netdev test-netdev ingress + [ meta load protocol => reg 1 ] + [ cmp eq reg 1 0x00000008 ] + [ payload load 1b @ network header + 0 => reg 1 ] + [ bitwise reg 1 = (reg=1 & 0x0000000f ) ^ 0x00000000 ] + [ lookup reg 1 set map%d dreg 1 ] + [ meta set mark with reg 1 ] + |