Changed the network interface rules, the correct behavior is for each host
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Wed, 28 Mar 2012 02:11:03 +0000 (23:11 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Wed, 28 Mar 2012 02:14:27 +0000 (23:14 -0300)
that has its source-network-interface equal to "default"
(e.g. source-network-interface=default) is supposed to use the global
default-source-network-interface item.

src/main.cpp

index 5a92c82..6f0b9e5 100644 (file)
@@ -123,9 +123,9 @@ void init_pingers(
         string destination_address = host->get_address();
         uint16_t destination_port = host->get_port();
         string host_network_interface = host->get_source_network_interface();
-        string network_interface = ( default_network_interface.empty() ) ?
-                host_network_interface :
-                default_network_interface;
+        string network_interface = ( host_network_interface == "default" ) ?
+                default_network_interface :
+                host_network_interface;
         PingProtocolList protocol_list = host->get_ping_protocol_list();
         int ping_interval_in_sec = host->get_interval_in_sec();
         PingSchedulerItem scheduler(