mnl: restore --debug=netlink output with chains
Pablo Neira Ayuso
maintainerPATCH 1/1 mnl: restore --debug=netlink output with chains
table and chain name are not displayed with --debug=netlink:
# nft --debug=netlink -f /tmp/x inet (null) (null) use 0 ...
Similar to 79acbfdbe536 ("mnl: restore --debug=netlink output with sets").
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- src/mnl.c | 8 ++++++++ 1 file changed, 8 insertions(+)
src/mnl.c +8 -0
@@ -835,8 +835,16 @@ int mnl_nft_chain_add(struct netlink_ctx *ctx, struct cmd *cmd,nftnl_udata_buf_free (udbuf); } } + + +nftnl_chain_set_str (nlc,NFTNL_CHAIN_TABLE , cmd->handle.table.name); +nftnl_chain_set_str (nlc,NFTNL_CHAIN_NAME , cmd->handle.chain.name); +netlink_dump_chain (nlc, ctx); +nftnl_chain_unset (nlc,NFTNL_CHAIN_TABLE ); +nftnl_chain_unset (nlc,NFTNL_CHAIN_NAME ); + nlh = nftnl_nlmsg_build_hdr(nftnl_batch_buffer(ctx->batch), NFT_MSG_NEWCHAIN, cmd->handle.family,
Signature · 1 line
2.30.2