From 79195a8cc9e9d9cf2d17165bf07ac4cc9d55539f Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 24 Nov 2022 14:17:17 +0100 Subject: xt: Rewrite unsupported compat expression dumping Choose a format which provides more information and is easily parseable. Then teach parsers about it and make it explicitly reject the ruleset giving a meaningful explanation. Also update the man pages with some more details. Signed-off-by: Phil Sutter --- include/json.h | 2 ++ include/parser.h | 1 + 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/json.h b/include/json.h index b0d78eb8..f691678d 100644 --- a/include/json.h +++ b/include/json.h @@ -92,6 +92,7 @@ json_t *connlimit_stmt_json(const struct stmt *stmt, struct output_ctx *octx); json_t *tproxy_stmt_json(const struct stmt *stmt, struct output_ctx *octx); json_t *synproxy_stmt_json(const struct stmt *stmt, struct output_ctx *octx); json_t *optstrip_stmt_json(const struct stmt *stmt, struct output_ctx *octx); +json_t *xt_stmt_json(const struct stmt *stmt, struct output_ctx *octx); int do_command_list_json(struct netlink_ctx *ctx, struct cmd *cmd); @@ -194,6 +195,7 @@ STMT_PRINT_STUB(connlimit) STMT_PRINT_STUB(tproxy) STMT_PRINT_STUB(synproxy) STMT_PRINT_STUB(optstrip) +STMT_PRINT_STUB(xt) #undef STMT_PRINT_STUB #undef EXPR_PRINT_STUB diff --git a/include/parser.h b/include/parser.h index f55da0fd..977fbb94 100644 --- a/include/parser.h +++ b/include/parser.h @@ -50,6 +50,7 @@ enum startcond_type { PARSER_SC_TCP, PARSER_SC_TYPE, PARSER_SC_VLAN, + PARSER_SC_XT, PARSER_SC_CMD_EXPORT, PARSER_SC_CMD_IMPORT, PARSER_SC_CMD_LIST, -- cgit v1.2.3