summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-03-14 20:23:12 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2022-03-20 02:29:47 +0300
commit3c1eb413a45b6c6327fed394705081ec6202b31a (patch)
treeab613ed42f5060095314843bb32a770677647c6e /include/net
parent611580d2df1f873e035f3dca109e5fa27448e0c7 (diff)
downloadlinux-3c1eb413a45b6c6327fed394705081ec6202b31a.tar.xz
netfilter: nft_fib: add reduce support
The fib expression stores to a register, so we can't add empty stub. Check that the register that is being written is in fact redundant. In most cases, this is expected to cancel tracking as re-use is unlikely. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nft_fib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netfilter/nft_fib.h b/include/net/netfilter/nft_fib.h
index 237f3757637e..eed099eae672 100644
--- a/include/net/netfilter/nft_fib.h
+++ b/include/net/netfilter/nft_fib.h
@@ -37,4 +37,7 @@ void nft_fib6_eval(const struct nft_expr *expr, struct nft_regs *regs,
void nft_fib_store_result(void *reg, const struct nft_fib *priv,
const struct net_device *dev);
+
+bool nft_fib_reduce(struct nft_regs_track *track,
+ const struct nft_expr *expr);
#endif