Commit aaa7b20b authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

netfilter: nft_meta: extend reduce support to bridge family

its enough to export the meta get reduce helper and then call it
from nft_meta_bridge too.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent e50ae445
...@@ -44,4 +44,6 @@ int nft_meta_set_validate(const struct nft_ctx *ctx, ...@@ -44,4 +44,6 @@ int nft_meta_set_validate(const struct nft_ctx *ctx,
const struct nft_expr *expr, const struct nft_expr *expr,
const struct nft_data **data); const struct nft_data **data);
bool nft_meta_get_reduce(struct nft_regs_track *track,
const struct nft_expr *expr);
#endif #endif
...@@ -99,6 +99,7 @@ static const struct nft_expr_ops nft_meta_bridge_get_ops = { ...@@ -99,6 +99,7 @@ static const struct nft_expr_ops nft_meta_bridge_get_ops = {
.eval = nft_meta_bridge_get_eval, .eval = nft_meta_bridge_get_eval,
.init = nft_meta_bridge_get_init, .init = nft_meta_bridge_get_init,
.dump = nft_meta_get_dump, .dump = nft_meta_get_dump,
.reduce = nft_meta_get_reduce,
}; };
static bool nft_meta_bridge_set_reduce(struct nft_regs_track *track, static bool nft_meta_bridge_set_reduce(struct nft_regs_track *track,
......
...@@ -752,8 +752,8 @@ static int nft_meta_get_offload(struct nft_offload_ctx *ctx, ...@@ -752,8 +752,8 @@ static int nft_meta_get_offload(struct nft_offload_ctx *ctx,
return 0; return 0;
} }
static bool nft_meta_get_reduce(struct nft_regs_track *track, bool nft_meta_get_reduce(struct nft_regs_track *track,
const struct nft_expr *expr) const struct nft_expr *expr)
{ {
const struct nft_meta *priv = nft_expr_priv(expr); const struct nft_meta *priv = nft_expr_priv(expr);
const struct nft_meta *meta; const struct nft_meta *meta;
...@@ -775,6 +775,7 @@ static bool nft_meta_get_reduce(struct nft_regs_track *track, ...@@ -775,6 +775,7 @@ static bool nft_meta_get_reduce(struct nft_regs_track *track,
return nft_expr_reduce_bitwise(track, expr); return nft_expr_reduce_bitwise(track, expr);
} }
EXPORT_SYMBOL_GPL(nft_meta_get_reduce);
static const struct nft_expr_ops nft_meta_get_ops = { static const struct nft_expr_ops nft_meta_get_ops = {
.type = &nft_meta_type, .type = &nft_meta_type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment