From f63b54623fcd1ab7d2f51928571c164409f00175 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 8 Jun 2018 17:27:18 +0200 Subject: JSON: Support latest enhancements of fwd statement JSON equivalent of fwd statement was too primitive to support the added address and family parameters, so make its value an object and accept the device expression as value of a "dev" property in there. Then add optional "addr" and "family" properties to it. While being at it, add a testcase to make sure the extended syntax works right. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- tests/py/any/fwd.t.json.output | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'tests/py/any/fwd.t.json.output') diff --git a/tests/py/any/fwd.t.json.output b/tests/py/any/fwd.t.json.output index 5a943567..e4bad620 100644 --- a/tests/py/any/fwd.t.json.output +++ b/tests/py/any/fwd.t.json.output @@ -2,21 +2,23 @@ [ { "fwd": { - "map": { - "left": { - "meta": "mark" - }, - "right": { - "set": [ - [ - 1, - "lo" - ], - [ - 2, - "lo" + "dev": { + "map": { + "left": { + "meta": "mark" + }, + "right": { + "set": [ + [ + 1, + "lo" + ], + [ + 2, + "lo" + ] ] - ] + } } } } -- cgit v1.2.3