diff options
| author | Michael Larson <slioch@eng-140.vyatta.com> | 2008-06-11 10:12:26 -0700 |
|---|---|---|
| committer | Michael Larson <slioch@eng-140.vyatta.com> | 2008-06-11 10:12:26 -0700 |
| commit | 809192c20cd340109dd35951ab9fe4b2351e00c6 (patch) | |
| tree | a92ac8b1e290b895c41fa35eb3c54faf38d06a2f /src/lbpathtest.cc | |
| parent | 2e7c23ff8769b41bdca8b1932552c4b88e9cb243 (diff) | |
| download | vyatta-wanloadbalance-809192c20cd340109dd35951ab9fe4b2351e00c6.tar.gz vyatta-wanloadbalance-809192c20cd340109dd35951ab9fe4b2351e00c6.zip | |
catch empty ping target on ping send. fixes error msgs for unresolved configured host name--possible fix for bug 3245.
Diffstat (limited to 'src/lbpathtest.cc')
| -rw-r--r-- | src/lbpathtest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lbpathtest.cc b/src/lbpathtest.cc index 93fe544..fd2e39b 100644 --- a/src/lbpathtest.cc +++ b/src/lbpathtest.cc @@ -189,6 +189,10 @@ LBPathTest::send(const string &iface, const string &target_addr, int packet_id) int icmp_pktsize = 40; char buffer[icmp_pktsize]; + if (iface.empty() || target_addr.empty()) { + return; + } + // bind a socket to a device name (might not work on all systems): setsockopt(_send_sock, SOL_SOCKET, SO_BINDTODEVICE, iface.c_str(), iface.size()); |
