summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/ip.t.json
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-06-16 13:49:08 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-06-18 09:40:20 +0200
commita5674886b45c9b3489aef8cc7435dd85afa9494a (patch)
tree476ff27ba9faacfa1e217f643ff87f143cea9208 /tests/py/ip/ip.t.json
parentbd51f04f73bd585f6e3f9ed82a5db7d9640198b8 (diff)
evaluate: unbreak verdict maps with implicit map with interval concatenations
Verdict maps in combination with interval concatenations are broken, e.g. # nft add rule x y tcp dport . ip saddr vmap { 1025-65535 . 192.168.10.2 : accept } Retrieve the concatenation field length and count from the map->map expressions that represents the key of the implicit map. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip/ip.t.json')
-rw-r--r--tests/py/ip/ip.t.json50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/py/ip/ip.t.json b/tests/py/ip/ip.t.json
index 32312b15..b1085035 100644
--- a/tests/py/ip/ip.t.json
+++ b/tests/py/ip/ip.t.json
@@ -1635,3 +1635,53 @@
}
}
]
+
+# ip saddr . ip daddr vmap { 192.168.5.1-192.168.5.128 . 192.168.6.1-192.168.6.128 : accept }
+[
+ {
+ "vmap": {
+ "data": {
+ "set": [
+ [
+ {
+ "concat": [
+ {
+ "range": [
+ "192.168.5.1",
+ "192.168.5.128"
+ ]
+ },
+ {
+ "range": [
+ "192.168.6.1",
+ "192.168.6.128"
+ ]
+ }
+ ]
+ },
+ {
+ "accept": null
+ }
+ ]
+ ]
+ },
+ "key": {
+ "concat": [
+ {
+ "payload": {
+ "field": "saddr",
+ "protocol": "ip"
+ }
+ },
+ {
+ "payload": {
+ "field": "daddr",
+ "protocol": "ip"
+ }
+ }
+ ]
+ }
+ }
+ }
+]
+