summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2023-03-01 11:58:22 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-03-01 12:05:18 +0100
commit8f0ea17384a889be8dc689db43f58faad59d32d5 (patch)
tree74862b55f7709ed7a9315bb6170e033921c02bbc
parent9cb501168a623b54668672bb1355dde4050a6093 (diff)
cache: fetch more objects when resetting rule
If the ruleset contains a reference to object, listing fails. The existing test for the new reset command displays the following error: # ./run-tests.sh testcases/rule_management/0011reset_0 I: using nft command: ./../../src/nft W: [FAILED] testcases/rule_management/0011reset_0: got 2 loading ruleset resetting specific rule netlink: Error: Unknown set 's' in dynset statement Fixes: 1694df2de79f ("Implement 'reset rule' and 'reset rules' commands") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/cache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cache.c b/src/cache.c
index 38bc219a..95adee7f 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -268,6 +268,7 @@ static unsigned int evaluate_cache_reset(struct cmd *cmd, unsigned int flags,
{
switch (cmd->obj) {
case CMD_OBJ_RULES:
+ case CMD_OBJ_RULE:
if (filter) {
if (cmd->handle.table.name) {
filter->list.family = cmd->handle.family;