[PATCH nft 2/5] cache: clean up evaluate_cache_del()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move NFT_CACHE_TABLE flag to default case to disentangle this.

Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/cache.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/cache.c b/src/cache.c
index 8cddabdb7b98..bed98bb71655 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -77,6 +77,7 @@ static unsigned int evaluate_cache_del(struct cmd *cmd, unsigned int flags)
 			 NFT_CACHE_SETELEM_MAYBE;
 		break;
 	default:
+		flags = NFT_CACHE_TABLE;
 		break;
 	}
 
@@ -500,8 +501,6 @@ int nft_cache_evaluate(struct nft_ctx *nft, struct list_head *cmds,
 			break;
 		case CMD_DELETE:
 		case CMD_DESTROY:
-			flags |= NFT_CACHE_TABLE;
-
 			flags = evaluate_cache_del(cmd, flags);
 			break;
 		case CMD_GET:
-- 
2.30.2





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux