Skip to contentSkip to conversation

netlink_delink_delinearize: don't store dependency unless relop checks is eq check

PATCH In review Florian Westphal 2 participants 2 messages May 9, 2017 – May 15, 2017 netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 netlink_delink_delinearize: don't store dependency unless relop checks is eq check

'ip protocol ne 6' is not a dependency for nexthdr protocol, and must not be stored as such.

Fixes 0b858391781ba308 ("src: annotate follow up dependency just after killing another")
---
 src/netlink_delinearize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/netlink_delinearize.c +1 -1
index a65a97da89fb..f0288cd49914 100644
@@ -1332,7 +1332,7 @@ static void payload_match_expand(struct rule_pp_ctx *ctx,
 			payload_dependency_store(&ctx->pdctx, nstmt, base - stacked);
 		} else {
 			payload_dependency_kill(&ctx->pdctx, nexpr->left);
-			if (left->flags & EXPR_F_PROTOCOL)
+			if (expr->op == OP_EQ && left->flags & EXPR_F_PROTOCOL)
 				payload_dependency_store(&ctx->pdctx, nstmt, base - stacked);
 		}
 	}
Signature · 1 line
2.10.2