summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2008-10-29 11:17:03 -0700
committerslioch <slioch@eng-140.vyatta.com>2008-10-29 11:17:03 -0700
commitac39481cf76ae84ea196d0cdc9cb4a849355b7ef (patch)
tree966f0e2f9d91d8a17320c790acf47db72230fb8a
parent5151ccc88b729896c5becc60b74e9dbf3be9be56 (diff)
downloadvyatta-wanloadbalance-ac39481cf76ae84ea196d0cdc9cb4a849355b7ef.tar.gz
vyatta-wanloadbalance-ac39481cf76ae84ea196d0cdc9cb4a849355b7ef.zip
fix for bug 3843. added warning level syslong messages on any interface that changes state in wan lb.
-rw-r--r--src/lbdata.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lbdata.cc b/src/lbdata.cc
index 470279a..bfaffcd 100644
--- a/src/lbdata.cc
+++ b/src/lbdata.cc
@@ -7,6 +7,7 @@
*/
#include <sys/time.h>
#include <time.h>
+#include <syslog.h>
#include <iostream>
#include "lbdata.hh"
@@ -167,14 +168,17 @@ LBData::dump()
bool
LBData::state_changed()
{
+ bool overall_state = false;
LBData::InterfaceHealthIter h_iter = _iface_health_coll.begin();
while (h_iter != _iface_health_coll.end()) {
if (h_iter->second.state_changed()) {
- return true;
+ string tmp = (h_iter->second._is_active ? string("ACTIVE") : string("FAILED"));
+ syslog(LOG_WARNING, "Interface %s has changed state to %s",h_iter->first.c_str(),tmp.c_str());
+ overall_state = true;
}
++h_iter;
}
- return false;
+ return overall_state;
}
/**