summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/optimizations/dumps/merge_nat.json-nft
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-11-21 14:22:54 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-11-22 12:15:54 +0100
commit485efcd3df69999d713031433d862147eba15cde (patch)
treebec7f837b12e5e508871d3e34f2474b6757ffb60 /tests/shell/testcases/optimizations/dumps/merge_nat.json-nft
parentcb2c37ca3adb7809035ec4ff5d01ffa532839875 (diff)
tests/shell: sanitize "handle" in JSON output
The "handle" in JSON output is not stable. Sanitize/normalize to zero. Adjust the sanitize code, and regenerate the .json-nft files. Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/optimizations/dumps/merge_nat.json-nft')
-rw-r--r--tests/shell/testcases/optimizations/dumps/merge_nat.json-nft2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/shell/testcases/optimizations/dumps/merge_nat.json-nft b/tests/shell/testcases/optimizations/dumps/merge_nat.json-nft
index 675ad48e..c4e448e7 100644
--- a/tests/shell/testcases/optimizations/dumps/merge_nat.json-nft
+++ b/tests/shell/testcases/optimizations/dumps/merge_nat.json-nft
@@ -1 +1 @@
-{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "test1", "handle": 2}}, {"chain": {"family": "ip", "table": "test1", "name": "y", "handle": 1}}, {"rule": {"family": "ip", "table": "test1", "chain": "y", "handle": 2, "expr": [{"match": {"op": "==", "left": {"meta": {"key": "oif"}}, "right": "lo"}}, {"accept": null}]}}, {"rule": {"family": "ip", "table": "test1", "chain": "y", "handle": 4, "expr": [{"dnat": {"addr": {"map": {"key": {"payload": {"protocol": "ip", "field": "saddr"}}, "data": {"set": [["4.4.4.4", "1.1.1.1"], ["5.5.5.5", "2.2.2.2"]]}}}}}]}}, {"table": {"family": "ip", "name": "test2", "handle": 4}}, {"chain": {"family": "ip", "table": "test2", "name": "y", "handle": 1}}, {"rule": {"family": "ip", "table": "test2", "chain": "y", "handle": 2, "expr": [{"match": {"op": "==", "left": {"meta": {"key": "oif"}}, "right": "lo"}}, {"accept": null}]}}, {"rule": {"family": "ip", "table": "test2", "chain": "y", "handle": 4, "expr": [{"dnat": {"family": "ip", "addr": {"map": {"key": {"payload": {"protocol": "tcp", "field": "dport"}}, "data": {"set": [[80, {"concat": ["1.1.1.1", 8001]}], [81, {"concat": ["2.2.2.2", 9001]}]]}}}}}]}}, {"rule": {"family": "ip", "table": "test2", "chain": "y", "handle": 6, "expr": [{"match": {"op": "==", "left": {"payload": {"protocol": "ip", "field": "saddr"}}, "right": {"set": [{"prefix": {"addr": "10.141.11.0", "len": 24}}, {"prefix": {"addr": "10.141.13.0", "len": 24}}]}}}, {"masquerade": null}]}}, {"table": {"family": "ip", "name": "test4", "handle": 6}}, {"chain": {"family": "ip", "table": "test4", "name": "y", "handle": 1}}, {"rule": {"family": "ip", "table": "test4", "chain": "y", "handle": 2, "expr": [{"match": {"op": "==", "left": {"meta": {"key": "oif"}}, "right": "lo"}}, {"accept": null}]}}, {"rule": {"family": "ip", "table": "test4", "chain": "y", "handle": 4, "expr": [{"dnat": {"family": "ip", "addr": {"map": {"key": {"concat": [{"payload": {"protocol": "ip", "field": "daddr"}}, {"payload": {"protocol": "tcp", "field": "dport"}}]}, "data": {"set": [[{"concat": ["1.1.1.1", 80]}, {"concat": ["4.4.4.4", 8000]}], [{"concat": ["2.2.2.2", 81]}, {"concat": ["3.3.3.3", 9000]}]]}}}}}]}}, {"rule": {"family": "ip", "table": "test4", "chain": "y", "handle": 6, "expr": [{"redirect": {"port": {"map": {"key": {"payload": {"protocol": "tcp", "field": "dport"}}, "data": {"set": [[83, 8083], [84, 8084]]}}}}}]}}, {"rule": {"family": "ip", "table": "test4", "chain": "y", "handle": 7, "expr": [{"match": {"op": "==", "left": {"payload": {"protocol": "tcp", "field": "dport"}}, "right": 85}}, {"redirect": null}]}}, {"table": {"family": "inet", "name": "nat", "handle": 8}}, {"chain": {"family": "inet", "table": "nat", "name": "prerouting", "handle": 1}}, {"chain": {"family": "inet", "table": "nat", "name": "postrouting", "handle": 2}}, {"rule": {"family": "inet", "table": "nat", "chain": "prerouting", "handle": 3, "expr": [{"match": {"op": "==", "left": {"meta": {"key": "oif"}}, "right": "lo"}}, {"accept": null}]}}, {"rule": {"family": "inet", "table": "nat", "chain": "prerouting", "handle": 5, "expr": [{"dnat": {"family": "ip", "addr": {"map": {"key": {"concat": [{"meta": {"key": "iifname"}}, {"payload": {"protocol": "ip", "field": "daddr"}}, {"payload": {"protocol": "tcp", "field": "dport"}}]}, "data": {"set": [[{"concat": ["enp2s0", "72.2.3.70", 80]}, {"concat": ["10.1.1.52", 80]}], [{"concat": ["enp2s0", "72.2.3.66", 53122]}, {"concat": ["10.1.1.10", 22]}], [{"concat": ["enp2s0", "72.2.3.66", 443]}, {"concat": ["10.1.1.52", 443]}]]}}}}}]}}, {"rule": {"family": "inet", "table": "nat", "chain": "postrouting", "handle": 6, "expr": [{"match": {"op": "==", "left": {"meta": {"key": "oif"}}, "right": "lo"}}, {"accept": null}]}}, {"rule": {"family": "inet", "table": "nat", "chain": "postrouting", "handle": 8, "expr": [{"snat": {"family": "ip", "addr": {"map": {"key": {"payload": {"protocol": "ip", "field": "daddr"}}, "data": {"set": [["72.2.3.66", "10.2.2.2"], ["72.2.3.67", "10.2.3.3"]]}}}}}]}}]}
+{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "test1", "handle": 0}}, {"chain": {"family": "ip", "table": "test1", "name": "y", "handle": 0}}, {"rule": {"family": "ip", "table": "test1", "chain": "y", "handle": 0, "expr": [{"match": {"op": "==", "left": {"meta": {"key": "oif"}}, "right": "lo"}}, {"accept": null}]}}, {"rule": {"family": "ip", "table": "test1", "chain": "y", "handle": 0, "expr": [{"dnat": {"addr": {"map": {"key": {"payload": {"protocol": "ip", "field": "saddr"}}, "data": {"set": [["4.4.4.4", "1.1.1.1"], ["5.5.5.5", "2.2.2.2"]]}}}}}]}}, {"table": {"family": "ip", "name": "test2", "handle": 0}}, {"chain": {"family": "ip", "table": "test2", "name": "y", "handle": 0}}, {"rule": {"family": "ip", "table": "test2", "chain": "y", "handle": 0, "expr": [{"match": {"op": "==", "left": {"meta": {"key": "oif"}}, "right": "lo"}}, {"accept": null}]}}, {"rule": {"family": "ip", "table": "test2", "chain": "y", "handle": 0, "expr": [{"dnat": {"family": "ip", "addr": {"map": {"key": {"payload": {"protocol": "tcp", "field": "dport"}}, "data": {"set": [[80, {"concat": ["1.1.1.1", 8001]}], [81, {"concat": ["2.2.2.2", 9001]}]]}}}}}]}}, {"rule": {"family": "ip", "table": "test2", "chain": "y", "handle": 0, "expr": [{"match": {"op": "==", "left": {"payload": {"protocol": "ip", "field": "saddr"}}, "right": {"set": [{"prefix": {"addr": "10.141.11.0", "len": 24}}, {"prefix": {"addr": "10.141.13.0", "len": 24}}]}}}, {"masquerade": null}]}}, {"table": {"family": "ip", "name": "test4", "handle": 0}}, {"chain": {"family": "ip", "table": "test4", "name": "y", "handle": 0}}, {"rule": {"family": "ip", "table": "test4", "chain": "y", "handle": 0, "expr": [{"match": {"op": "==", "left": {"meta": {"key": "oif"}}, "right": "lo"}}, {"accept": null}]}}, {"rule": {"family": "ip", "table": "test4", "chain": "y", "handle": 0, "expr": [{"dnat": {"family": "ip", "addr": {"map": {"key": {"concat": [{"payload": {"protocol": "ip", "field": "daddr"}}, {"payload": {"protocol": "tcp", "field": "dport"}}]}, "data": {"set": [[{"concat": ["1.1.1.1", 80]}, {"concat": ["4.4.4.4", 8000]}], [{"concat": ["2.2.2.2", 81]}, {"concat": ["3.3.3.3", 9000]}]]}}}}}]}}, {"rule": {"family": "ip", "table": "test4", "chain": "y", "handle": 0, "expr": [{"redirect": {"port": {"map": {"key": {"payload": {"protocol": "tcp", "field": "dport"}}, "data": {"set": [[83, 8083], [84, 8084]]}}}}}]}}, {"rule": {"family": "ip", "table": "test4", "chain": "y", "handle": 0, "expr": [{"match": {"op": "==", "left": {"payload": {"protocol": "tcp", "field": "dport"}}, "right": 85}}, {"redirect": null}]}}]}