From: Christian Herdtweck Date: Thu, 30 Apr 2015 16:09:07 +0000 (+0200) Subject: found reason for 0.0.0.0 IPs in logs: IcmpPingers are created without IP but register... X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=130a7eda12c6bb4462011f3aac0aba00ef4926c7;p=pingcheck found reason for 0.0.0.0 IPs in logs: IcmpPingers are created without IP but register immediately with PacketDistributor adjust log message, should probably remove debug output some time --- diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index c9ee1b2..788e44b 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -299,6 +299,14 @@ bool IcmpPinger::handle_receive_icmp_packet(const IcmpPacketItem icmp_packet, << endl; return does_match; } + else if ( DestinationEndpoint.address() == address() ) + { // we have no IP set yet + GlobalLogger.debug() + << DestinationEndpoint.address().to_string() + << ": Not interested in packets since have no Destination yet" + << endl; + return does_match; + } // We can receive all ICMP packets received by the host, so we need to // filter out only the echo replies that match our identifier,