]> git.ipfire.org Git - thirdparty/nftables.git/commit
cache: assert filter when calling nft_cache_evaluate()
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 29 Aug 2024 10:42:08 +0000 (12:42 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 30 Aug 2024 10:28:10 +0000 (12:28 +0200)
commit4dd20f3bbd606eed4869ebe449debee8b2ac7900
treee426277dc2d63b5e34956534b3df06b26e8e1171
parent221975dbefe4ed56e8797c0efaf558d639445d1b
cache: assert filter when calling nft_cache_evaluate()

nft_cache_evaluate() always takes a non-null filter, remove superfluous
checks when calculating cache requirements via flags.

Note that filter is still option from netlink dump path, since this can
be called from error path to provide hints.

Fixes: 08725a9dc14c ("cache: filter out rules by chain")
Fixes: b3ed8fd8c9f3 ("cache: missing family in cache filtering")
Fixes: 635ee1cad8aa ("cache: filter out sets and maps that are not requested")
Fixes: 3f1d3912c3a6 ("cache: filter out tables that are not requested")
Tested-by: Eric Garver <eric@garver.life>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/cache.c