Use netlink_list_chains instead of netlink_list_chain (note the final `s')
After "nft list table filter" shows:
table filter {
chain input {
}
}
"nft list chain filter input" shows:
table filter {
}
case CMD_OBJ_CHAIN:
if (do_list_sets(ctx, table) < 0)
return -1;
- if (netlink_list_chain(ctx, &cmd->handle) < 0)
+ if (netlink_list_chains(ctx, &cmd->handle) < 0)
+ return -1;
+ list_splice_tail_init(&ctx->list, &table->chains);
+ if (netlink_list_table(ctx, &cmd->handle) < 0)
return -1;
break;
case CMD_OBJ_SETS: