Page MenuHomeVyOS Platform

Bug in weigt calculation for failover mode
Open, Requires assessmentPublicBUG

Description

Possible fix for correction:

diff --git a/src/lbdecision.cc b/src/lbdecision.cc
index a5c334e..2005585 100644
--- a/src/lbdecision.cc
+++ b/src/lbdecision.cc
@@ -572,9 +572,11 @@ LBDecision::get_new_weights(LBData &data, LBRule &rule)
 	    w_iter->second = 0.; //zero out previous weight
 	    ++w_iter;
 	  }
+	  weights.insert(pair<string,float>(iter->first,iter->second));
+	  group = iter->second;
+	} else {
+	  weights.insert(pair<string,float>(iter->first,0.));
 	}
-	weights.insert(pair<string,float>(iter->first,iter->second));
-	group = iter->second;
       }
       else {
 	weights.insert(pair<string,float>(iter->first,0.));

Details

Difficulty level
Normal (likely a few hours)
Version
1.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

@banditos13 Can you describe more details?
What is the bug and how to reproduce it?

banditos13 added a comment.EditedMon, Sep 14, 3:03 PM

In failover mode only one active channel with "best parameters" can be used for connections

pasik added a subscriber: pasik.Mon, Sep 14, 3:08 PM