diff options
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1260,6 +1260,14 @@ json_t *nat_stmt_json(const struct stmt *stmt, struct output_ctx *octx) json_t *root = json_object(); json_t *array = nat_flags_json(stmt->nat.flags); + switch (stmt->nat.family) { + case NFPROTO_IPV4: + case NFPROTO_IPV6: + json_object_set_new(root, "family", + json_string(family2str(stmt->nat.family))); + break; + } + if (stmt->nat.addr) json_object_set_new(root, "addr", expr_print_json(stmt->nat.addr, octx)); |