diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-05-05 20:12:46 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-05-05 20:21:27 +0200 |
commit | d0d564ed1fba00cc3b2fdf4d646f080b2790b76a (patch) | |
tree | 698d17c51a94b3d82512b7ce1608a505a6e649ea /src/xt.c | |
parent | eea03c8fb560a8a6deede1bccbce78b52b2c2905 (diff) |
src: add rule_stmt_append() and use it
This helper function adds a statement at the end of the rule statement
list and it updates the rule statement counter.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/xt.c')
-rw-r--r-- | src/xt.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -238,7 +238,7 @@ void netlink_parse_match(struct netlink_parse_ctx *ctx, stmt->xt.name = strdup(name); stmt->xt.type = NFT_XT_MATCH; #endif - list_add_tail(&stmt->list, &ctx->rule->stmts); + rule_stmt_append(ctx->rule, stmt); } void netlink_parse_target(struct netlink_parse_ctx *ctx, @@ -283,7 +283,7 @@ void netlink_parse_target(struct netlink_parse_ctx *ctx, stmt->xt.name = strdup(name); stmt->xt.type = NFT_XT_TARGET; #endif - list_add_tail(&stmt->list, &ctx->rule->stmts); + rule_stmt_append(ctx->rule, stmt); } #ifdef HAVE_LIBXTABLES |