I'm not sure if this applies to 1.8.0 but just in case I am placing it here.
This is a copy of https://bugs.debian.org/745026
From: "Steinar H. Gunderson" [email protected]
To: Debian Bug Tracking System [email protected]
Subject: mixes up clients, causing spurious ping replies
Date: Thu, 17 Apr 2014 12:44:24 +0200
Package: liboping0
Version: 1.6.2-1
Hi,
I'm using liboping (through the Perl module) to ping ~250 devices and put the results on a map. However, frequently, clients that cannot possibly be up (they haven't been deployed yet) blip up for one ping as if they were up, with a completely reasonable latency value.
Some code reading uncovered why: liboping uses random ICMP ident values (which are 16 bit) for each ping, and when the ping reply comes back, it uses only this ident value to correlate it back to the machine. Due to the birthday problem, 250 devices mean that there's ~50% probability of two devices getting the same ident value, and so the ping reply from one of the hosts actually being up gets misattributed to one of the hosts that are down. This affects both IPv4 and IPv6.
I've hacked around it by dropping the randomization (just counting ident sequentially up), but a better fix would probably be simply checking the source address of the reply packet (in addition to the ident); by definition, it should be the same as the one we sent to.