From 130a7eda12c6bb4462011f3aac0aba00ef4926c7 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Thu, 30 Apr 2015 18:09:07 +0200 Subject: [PATCH] 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 --- src/icmp/icmppinger.cpp | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) 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, -- 1.7.1