[PATCH nft] optimize: compare meta inner_desc pointers too

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

 



We can't merge if one referes inner and other outer header.
Payload checks this but meta did not.

Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
---
 src/optimize.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/optimize.c b/src/optimize.c
index 62dd9082a587..5903694de5de 100644
--- a/src/optimize.c
+++ b/src/optimize.c
@@ -63,6 +63,8 @@ static bool __expr_cmp(const struct expr *expr_a, const struct expr *expr_b)
 			return false;
 		if (expr_a->meta.base != expr_b->meta.base)
 			return false;
+		if (expr_a->meta.inner_desc != expr_b->meta.inner_desc)
+			return false;
 		break;
 	case EXPR_CT:
 		if (expr_a->ct.key != expr_b->ct.key)
-- 
2.44.2





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

  Powered by Linux