Don't bind the source interface if not specified
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 29 Apr 2011 09:20:18 +0000 (11:20 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 29 Apr 2011 09:20:18 +0000 (11:20 +0200)
src/host/boostpinger.cpp

index 6b0ef3e..d0c836a 100644 (file)
@@ -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;