From 790889957b48f4d28dc1699bd6c193617f2141b3 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 2 Jun 2021 12:47:24 +0200 Subject: json: fix base chain output nft-test.py -j fails with python: json.c:243: chain_print_json: Assertion `__out' failed. The member was changed from char * to a struct, pass the name again. Fixes: 5008798157e2114f ("libnftables: location-based error reporting for chain type") Signed-off-by: Florian Westphal (cherry picked from commit cabe8992b3ee4eb0001a07075b317d966df6bcbd) --- src/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/json.c') diff --git a/src/json.c b/src/json.c index a3d1008f..e588ef4c 100644 --- a/src/json.c +++ b/src/json.c @@ -241,7 +241,7 @@ static json_t *chain_print_json(const struct chain *chain) mpz_export_data(&policy, chain->policy->value, BYTEORDER_HOST_ENDIAN, sizeof(int)); tmp = json_pack("{s:s, s:s, s:i, s:s}", - "type", chain->type, + "type", chain->type.str, "hook", hooknum2str(chain->handle.family, chain->hook.num), "prio", priority, -- cgit v1.2.3