From 25ccb4587de81e1b348e4e2f5404e70097ea8ec9 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 28 May 2018 18:51:01 +0200 Subject: JSON: Review set elem expressions * There is no need to prefix element-specific properties with 'elem_', they can't conflict. * In json_parse_set_stmt(), searching for above properties is pointless since that's already done by called function. * Fix potential NULL-pointer deref in json_parse_set_elem_expr_stmt(): json_parse_flagged_expr() may return NULL. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- tests/py/ip/flowtable.t.json.output | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/py/ip/flowtable.t.json.output (limited to 'tests/py/ip/flowtable.t.json.output') diff --git a/tests/py/ip/flowtable.t.json.output b/tests/py/ip/flowtable.t.json.output new file mode 100644 index 00000000..004349a8 --- /dev/null +++ b/tests/py/ip/flowtable.t.json.output @@ -0,0 +1,24 @@ +# meter xyz { ip saddr timeout 30s counter} +[ + { + "meter": { + "key": { + "elem": { + "timeout": 30, + "val": { + "payload": { + "field": "saddr", + "name": "ip" + } + } + } + }, + "name": "xyz", + "size": 65535, + "stmt": { + "counter": null + } + } + } +] + -- cgit v1.2.3