From 8a7c992118f53550ee36eb6c6804043f36d8e6d0 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Fri, 29 Apr 2011 11:20:18 +0200 Subject: [PATCH] Don't bind the source interface if not specified --- src/host/boostpinger.cpp | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/host/boostpinger.cpp b/src/host/boostpinger.cpp index 6b0ef3e..d0c836a 100644 --- a/src/host/boostpinger.cpp +++ b/src/host/boostpinger.cpp @@ -48,9 +48,8 @@ BoostPinger::BoostPinger( EchoReplyTimeoutInSec( echo_reply_timeout_in_sec ), PingerStatus( PingStatus_NotSent ) { - BOOST_ASSERT( !source_network_interface.empty() ); - - if ( !select_source_network_interface( source_network_interface ) ) + if ( !source_network_interface.empty() && + !select_source_network_interface( source_network_interface ) ) { GlobalLogger.error() << "Error: could not bind the socket " "with the local interface." << ::strerror( errno ) << endl; -- 1.7.1