json: fix base chain output
Florian Westphal
maintainerPATCH 1/1 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 <[email protected]>
--- src/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/json.c +1 -1
@@ -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,
Signature · 1 line
2.26.3