diff options
| author | slioch <slioch@eng-140.vyatta.com> | 2009-06-17 15:07:06 -0700 |
|---|---|---|
| committer | slioch <slioch@eng-140.vyatta.com> | 2009-06-17 15:12:25 -0700 |
| commit | 0d5777b96fec7e16dbcf2a96b285dc0ed493a34c (patch) | |
| tree | 4cd560ba337a09ca72d1c978239bf910ea601bb1 /src/lbpathtest.cc | |
| parent | 02c414300e38d2c354bc74353328f7b456be2e24 (diff) | |
| download | vyatta-wanloadbalance-0d5777b96fec7e16dbcf2a96b285dc0ed493a34c.tar.gz vyatta-wanloadbalance-0d5777b96fec7e16dbcf2a96b285dc0ed493a34c.zip | |
ping target is now optional. nexthop will be used in place of ping target if ping target is not specified. this is also true of dhcp configurations.
Diffstat (limited to 'src/lbpathtest.cc')
| -rw-r--r-- | src/lbpathtest.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lbpathtest.cc b/src/lbpathtest.cc index df29921..ebe55cd 100644 --- a/src/lbpathtest.cc +++ b/src/lbpathtest.cc @@ -101,11 +101,16 @@ LBPathTest::start(LBData &lb_data) //iterate over packets and send LBData::InterfaceHealthIter iter = lb_data._iface_health_coll.begin(); while (iter != lb_data._iface_health_coll.end()) { + string target = iter->second._ping_target; + if (target.empty()) { + target = iter->second._nexthop; + } + if (_debug) { - cout << "LBPathTest::start(): sending ping test for: " << iter->first << " for " << iter->second._ping_target << endl; + cout << "LBPathTest::start(): sending ping test for: " << iter->first << " for " << target << endl; } _packet_id = ++_packet_id % 32767; - send(iter->first, iter->second._ping_target, _packet_id); + send(iter->first, target, _packet_id); results.insert(pair<int,PktData>(_packet_id,PktData(iter->first,-1))); ++ct; |
