From 1ac321d8093787035c09c0bcabaae64bef7f5d2e Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Mon, 12 Sep 2011 14:58:32 -0700 Subject: fix for bug 7315. Target status behavior has been modified to fix this bug: vyatta@vyatta# run show wan-load-balance Interface: eth0 Status: active Last Status Change: Mon Sep 12 21:55:13 2011 -Test: ping Target: 8.8.8.8 +Test: ping Target: 10.3.0.120 Test: ping Target: 127.0.0.1 Last Interface Success: 0s Last Interface Failure: n/a # Interface Failure(s): 0 [edit] vyatta@vyatta# run show wan-load-balance Interface: eth0 Status: active Last Status Change: Mon Sep 12 21:55:13 2011 +Test: ping Target: 8.8.8.8 Test: ping Target: 10.3.0.120 Test: ping Target: 127.0.0.1 Last Interface Success: 0s Last Interface Failure: n/a # Interface Failure(s): 0 - denotes failed test + denotes successful test blank means the test wasn't performed All test status' refer to the last test cycle. --- src/lbdata.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lbdata.cc') diff --git a/src/lbdata.cc b/src/lbdata.cc index 39deaa6..99c36e7 100644 --- a/src/lbdata.cc +++ b/src/lbdata.cc @@ -66,6 +66,12 @@ LBHealth::put(int rtt) void LBHealth::start_new_test_cycle() { + //let's first clear out all the old results + TestIter t = _test_coll.begin(); + while (t != _test_coll.end()) { + t->second->_state = LBTest::K_NONE; + ++t; + } _test_iter = _test_coll.begin(); // _test_iter->second->start(); } -- cgit v1.2.3