[PATCH nft 4/4] cache: honor table in set filtering

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

 



Check if table mismatch, in case the same set name is used in different
tables.

Fixes: 635ee1cad8aa ("cache: filter out sets and maps that are not requested")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cache.c b/src/cache.c
index 691e8131c494..f62c9b96f528 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -377,7 +377,8 @@ static int set_cache_cb(struct nftnl_set *nls, void *arg)
 		return -1;
 
 	if (ctx->filter && ctx->filter->set &&
-	    (strcmp(ctx->filter->set, set->handle.set.name))) {
+	    (strcmp(ctx->filter->table, set->handle.table.name) ||
+	     strcmp(ctx->filter->set, set->handle.set.name))) {
 		set_free(set);
 		return 0;
 	}
-- 
2.30.2




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

  Powered by Linux