Use the "host.source-network-interface" only if the global "default-source-network...
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Wed, 14 Mar 2012 00:22:02 +0000 (21:22 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Wed, 14 Mar 2012 00:22:02 +0000 (21:22 -0300)
src/main.cpp

index 24496fc..a29e3b3 100644 (file)
@@ -122,6 +122,10 @@ void init_pingers(
     {
         string destination_address = host->get_address();
         uint16_t destination_port = host->get_port();
+        if ( local_interface.empty() )
+        {
+            local_interface = host->get_source_network_interface();
+        }
         PingProtocol protocol = host->get_ping_protocol();
         int ping_interval_in_sec = host->get_interval_in_sec();
         PingSchedulerItem scheduler(