cache: fetch more objects when resetting rule
Pablo Neira Ayuso
maintainerPATCH 1/2 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
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- src/cache.c | 1 + 1 file changed, 1 insertion(+)
src/cache.c +1 -0
@@ -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;
Signature · 1 line
2.30.2
Pablo Neira Ayuso
maintainerPATCH 2/2 tests: shell: use bash in 0011reset_0
One of my boxes does not use bash as /bin/sh, update this test to explicitly use bash, otherwise I hit:
testcases/rule_management/0011reset_0: 71: Syntax error: "(" unexpected
Fixes 1694df2de79f ("Implement 'reset rule' and 'reset rules' commands")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- tests/shell/testcases/rule_management/0011reset_0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/shell/testcases/rule_management/0011reset_0 +1 -1
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e
Signature · 1 line
2.30.2