From f03aae7a34b189b07392e06791d694ccb12f6252 Mon Sep 17 00:00:00 2001 From: Brenton Bostick Date: Thu, 14 Sep 2023 13:35:50 -0400 Subject: [PATCH] Fix test that was always true Intention was to have (x >= 0 && x <= 8) but rules[rn].v.qosBucket is unsigned (thus always >= 0) --- node/Network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/Network.cpp b/node/Network.cpp index 1e77e4636..233c10641 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -118,7 +118,7 @@ static _doZtFilterResult _doZtFilter( if (thisSetMatches) { switch(rt) { case ZT_NETWORK_RULE_ACTION_PRIORITY: - qosBucket = (rules[rn].v.qosBucket >= 0 || rules[rn].v.qosBucket <= 8) ? rules[rn].v.qosBucket : 4; // 4 = default bucket (no priority) + qosBucket = (rules[rn].v.qosBucket <= 8) ? rules[rn].v.qosBucket : 4; // 4 = default bucket (no priority) return DOZTFILTER_ACCEPT; case ZT_NETWORK_RULE_ACTION_DROP: