diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-08-19 13:42:36 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-08-27 16:10:57 +0200 |
| commit | 43559058d21e0493aa220ac167e0279334dea5f9 (patch) | |
| tree | 9b1f855dd8de90841bfc44e832042d2f3f414a7c /tools/perf/scripts/python | |
| parent | 793d9eda4821f75b5f7cc9e6a870b72a58b44c2b (diff) | |
| download | linux-43559058d21e0493aa220ac167e0279334dea5f9.tar.gz linux-43559058d21e0493aa220ac167e0279334dea5f9.zip | |
netfilter: nf_tables: skip double clone set expressions on element insert
Both the dynset and newsetelem path clone the existing set expressions
when setting set element expressions if no override expressions are
provided. This results in a double clone, once to clone the template set
expressions then another clone on the new element. Add a flag to
annotate if userspace provides a override expression (ie. expression of
the same type of the set but different configuration), otherwise borrow
the existing expression from the set. Add conditionals to release
expression iif they represent an override. Use this new override_exprs
flag to dump the dynset expression override to userspace.
This simplifies the existing logic and it also fixes a bug with the
connlimit expression which results in a module refcount imbalance
WARNING splat when resorting on the default set expressions.
Fixes: 65038428b2c6 ("netfilter: nf_tables: allow to specify stateful expression in set definition")
Fixes: fca05d4d61e6 ("netfilter: nft_dynset: honor stateful expressions in set definition")
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
