From 1b8953e75c20437b5c563d86c3ba11d1b24e3ec4 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 9 May 2019 13:35:41 +0200 Subject: json: Fix tproxy support regarding latest changes Family may be specified also if no address is given at the same time, make parser/printer tolerant to that. Also fix for missing/incorrect JSON equivalents in tests/py. While being at it, fix two issues in non-JSON tests: * Ruleset is printed in numeric mode, so use 'l4proto 6' instead of 'l4proto tcp' in rules to avoid having to specify expected output for that unrelated bit. * In ip and ip6 family tables, family parameter is not deserialized on output. Fixes: 3edb96200690b ("parser_bison: missing tproxy syntax with port only for inet family") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- tests/py/inet/tproxy.t.payload | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/py/inet/tproxy.t.payload') diff --git a/tests/py/inet/tproxy.t.payload b/tests/py/inet/tproxy.t.payload index 8a6ba036..82ff928d 100644 --- a/tests/py/inet/tproxy.t.payload +++ b/tests/py/inet/tproxy.t.payload @@ -49,7 +49,7 @@ inet x y [ immediate reg 1 0x0000a0c3 ] [ tproxy ip6 port reg 1 ] -# ip daddr 0.0.0.0/0 meta l4proto tcp tproxy ip to :2000 +# ip daddr 0.0.0.0/0 meta l4proto 6 tproxy ip to :2000 inet x y [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x00000002 ] -- cgit v1.2.3