diff options
author | Phil Sutter <phil@nwl.cc> | 2019-08-21 00:33:51 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2019-11-25 23:31:12 +0100 |
commit | 6d19208caf8325649b9c7888fa8b3db796807c20 (patch) | |
tree | eb180caf9d9f658856fcd33e096fb743d5fd1f94 /iptables/nft-shared.c | |
parent | 6f873ed5dc5c4deb0cf9a6d6876a04e610d735f9 (diff) |
nft: Support parsing lookup expression
Add required glue code to support family specific lookup expression
parsers implemented as family_ops callback.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r-- | iptables/nft-shared.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index 19630c1e..78e42278 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -588,6 +588,13 @@ static void nft_parse_limit(struct nft_xt_ctx *ctx, struct nftnl_expr *e) ctx->h->ops->parse_match(match, ctx->cs); } +static void nft_parse_lookup(struct nft_xt_ctx *ctx, struct nft_handle *h, + struct nftnl_expr *e) +{ + if (ctx->h->ops->parse_lookup) + ctx->h->ops->parse_lookup(ctx, e, NULL); +} + void nft_rule_to_iptables_command_state(struct nft_handle *h, const struct nftnl_rule *r, struct iptables_command_state *cs) @@ -628,6 +635,8 @@ void nft_rule_to_iptables_command_state(struct nft_handle *h, nft_parse_target(&ctx, expr); else if (strcmp(name, "limit") == 0) nft_parse_limit(&ctx, expr); + else if (strcmp(name, "lookup") == 0) + nft_parse_lookup(&ctx, h, expr); expr = nftnl_expr_iter_next(iter); } |