Skip to contentSkip to conversation

evaluate: skip binary transfer for named sets

PATCH New Pablo Neira Ayuso 1 participant 1 message Mar 26, 2019 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 evaluate: skip binary transfer for named sets

May be empty, content might be yet unknown, we can do any transfer in this case.

---
Will try to scratch time to make a test for this, otherwise anyone sending patches to extend to coverage for this, it would be great.

 src/evaluate.c | 3 +++
 1 file changed, 3 insertions(+)
src/evaluate.c +3 -0
index 54afc3340186..94377da99335 100644
@@ -1606,6 +1606,9 @@ static int __binop_transfer(struct eval_ctx *ctx,
 		}
 		break;
 	case EXPR_SET_REF:
+		if (!((*right)->set->flags & NFT_SET_ANONYMOUS))
+			return 0;
+
 		return __binop_transfer(ctx, left, &(*right)->set->init);
 	default:
 		return 0;
Signature · 1 line
2.11.0