diff options
author | 2022-03-14 18:23:00 +0100 | |
---|---|---|
committer | 2022-03-20 00:29:46 +0100 | |
commit | b2d306542ff935a4edf7a88ba8145c108193442a (patch) | |
tree | 4c02a42b60c7c6305d11ac1838127795238e18e7 /net/ipv6/netfilter | |
parent | netfilter: conntrack: Add and use nf_ct_set_auto_assign_helper_warned() (diff) | |
download | linux-b2d306542ff935a4edf7a88ba8145c108193442a.tar.gz linux-b2d306542ff935a4edf7a88ba8145c108193442a.tar.bz2 linux-b2d306542ff935a4edf7a88ba8145c108193442a.zip |
netfilter: nf_tables: do not reduce read-only expressions
Skip register tracking for expressions that perform read-only operations
on the registers. Define and use a cookie pointer NFT_REDUCE_READONLY to
avoid defining stubs for these expressions.
This patch re-enables register tracking which was disabled in ed5f85d42290
("netfilter: nf_tables: disable register tracking"). Follow up patches
add remaining register tracking for existing expressions.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter')
-rw-r--r-- | net/ipv6/netfilter/nft_dup_ipv6.c | 1 | ||||
-rw-r--r-- | net/ipv6/netfilter/nft_reject_ipv6.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/netfilter/nft_dup_ipv6.c b/net/ipv6/netfilter/nft_dup_ipv6.c index 3a00d95e964e..70a405b4006f 100644 --- a/net/ipv6/netfilter/nft_dup_ipv6.c +++ b/net/ipv6/netfilter/nft_dup_ipv6.c @@ -73,6 +73,7 @@ static const struct nft_expr_ops nft_dup_ipv6_ops = { .eval = nft_dup_ipv6_eval, .init = nft_dup_ipv6_init, .dump = nft_dup_ipv6_dump, + .reduce = NFT_REDUCE_READONLY, }; static const struct nla_policy nft_dup_ipv6_policy[NFTA_DUP_MAX + 1] = { diff --git a/net/ipv6/netfilter/nft_reject_ipv6.c b/net/ipv6/netfilter/nft_reject_ipv6.c index ed69c768797e..5c61294f410e 100644 --- a/net/ipv6/netfilter/nft_reject_ipv6.c +++ b/net/ipv6/netfilter/nft_reject_ipv6.c @@ -46,6 +46,7 @@ static const struct nft_expr_ops nft_reject_ipv6_ops = { .init = nft_reject_init, .dump = nft_reject_dump, .validate = nft_reject_validate, + .reduce = NFT_REDUCE_READONLY, }; static struct nft_expr_type nft_reject_ipv6_type __read_mostly = { |