[smokeping-users] FPing alternative

Dale Carstensen dlc at lampinc.com
Sat Sep 27 20:33:50 CEST 2008


The patch seems to have a problem if a target doesn't respond with
ICMP echo reply.  The function handle_random_icmp gets a seg fault.
I see why.

The section of the patch:

@@ -1726,6 +1728,7 @@
 {
        struct icmp *sent_icmp;
        struct ip *sent_ip;
+       long id = sent_icmp->icmp_seq % num_hosts;
        u_char *c;
        HOST_ENTRY *h;
 
uses "sent_icmp" to initialize "id", but "sent_icmp" is undefined.
Maybe "p" can be used instead.  Maybe the initialization of "id"
can be deferred to after the initialization of sent_icmp.  If I
understand what I read in the source, sent_icmp seems to be offset
from p by 28 something, not sure whether it's bytes, or some
structure size.

I'm not sure what the intent was here, but the way it is now is
guaranteed to fail.

>Re: [smokeping-users] FPing alternative
>
>   Israel Brewster
>   Tue, 19 Aug 2008 09:17:46 -0700
>Yep, that patch fixed it - I can now ping all my hosts successfully.
>At least in initial testing, but considering that before I was
>consistently getting lost packets, this looks good. Thank you all very
>much for your efforts and patience, and a special thanks to Tobias for
>coming up with the patch!
>
>-----------------------------------------------
>Israel Brewster
>Computer Support Technician
>Frontier Flying Service Inc.
>5245 Airport Industrial Rd
>Fairbanks, AK 99709
>(907) 450-7250 x293
>-----------------------------------------------
>
>
>On Aug 18, 2008, at 12:19 PM, Tobias Oetiker wrote:
>
>> Hi Israel,
>>
>> I have no such device to test, but I have cobbled togather a patch
>> that might help ...
>>
>> try
>>
>> [12]http://oss.oetiker.ch/smokeping/pub/fping-2.4b2_to-sequence-fix.patch
>>
>> and let me know if it helps
>>
>> cheers
>> tobi
>>
>>
>>
>> Today Israel Brewster wrote:
>>
>>> Sorry about resurrecting an old dead thread, but I was wondering if
>>> there had been any changes in the last few months since the last
>>> posting, perhaps updates to the fping probe or the like? This
>>> continues to be an issue for us, and I am not at all happy with the
>>> work around I have in place (sending 4 pings with a 15 second
>>> interval).
>>>
>>> To rehash: the problem we are running into is that when using fping
>>> against certain devices, only one or two packets are returned,
>>> regardless of device function and number of packets sent. Setting a
>>> higher packet interval (such at the 15 seconds mentioned previously)
>>> allows a limited number of additional packets to return, but is not a
>>> workable solution. From previous discussions, it would appear that
>>> the
>>> issue is with fping not updating the sequence number, but patching
>>> that issue is beyond my skill level. Thanks!
>>>
>>> -----------------------------------------------
>>> Israel Brewster
>>> Computer Support Technician
>>> Frontier Flying Service Inc.
>>> 5245 Airport Industrial Rd
>>> Fairbanks, AK 99709
>>> (907) 450-7250 x293
>>> -----------------------------------------------
>>>
>>>
>>> On May 19, 2008, at 8:10 AM, Israel Brewster wrote:
>>>
>>>>
>>>>
>>>>
>>>> On May 17, 2008, at 11:03 AM, Niko Tyni wrote:
>>>>
>>>>> On Sat, May 17, 2008 at 02:20:04PM -0400, Mike Lerley wrote:
>>>>>
>>>>>> Fair enough; however, I have turned on and off all options I can
>>>>>> find on the
>>>>>> router related to that sort of thing and nothing changes.  More
>>>>>> importantly,
>>>>>> I can do this:
>>>>>>
>>>>>> [EMAIL PROTECTED]:~# ping -f tobeys.gotdns.com
>>>>>> PING tobeys.gotdns.com (24.39.29.68) 56(84) bytes of data.
>>>>>> .......................................
>>>>>> --- tobeys.gotdns.com ping statistics ---
>>>>>> 3609 packets transmitted, 3570 received, 1% packet loss, time
>>>>>> 47185ms
>>>>>> rtt min/avg/max/mdev = 23.229/31.162/72.274/7.039 ms, pipe 6, ipg/
>>>>>> ewma
>>>>>> 13.078/27.893 ms
>>>>>>
>>>>>> Clearly, there is no packet rate limiting in effect here...
>>>>>
>>>>> It's most probably looking at the ICMP sequence number.  While the
>>>>> 'regular ping' increments the sequence number for each ping, fping
>>>>> apparently uses is as an index to the hosts it's pinging. So the
>>>>> first
>>>>> host gets sequence number 0 for all pings, the second one gets 1
>>>>> etc.
>>>>>
>>>>> The device probably considers the unchanging sequence number an
>>>>> attack
>>>>> and stops responding.
>>>>>
>>>>> It should be quite easy to patch fping to store the information in
>>>>> the
>>>>> payload instead and increase the sequence number like the rest of
>>>>> the
>>>>> world does. No, no patch at least yet :)
>>>>>
>>>>> Cheers,
>>>>
>>>> Now that is the best answer I have heard yet- it actually makes
>>>> sense
>>>> (to a degree, at least), and fits the observed facts. Any chance of
>>>> such a patch being written by someone? I'd be happy to test it, if
>>>> so... Actually, I'd almost be happy to write it, except I don't
>>>> think
>>>> my understanding of networks, ping payloads, and how this all
>>>> works is
>>>> quite up to the task :).
>>>>
>>>> -----------------------------------------------
>>>> Israel Brewster
>>>> Computer Support Technician
>>>> Frontier Flying Service Inc.
>>>> 5245 Airport Industrial Rd
>>>> Fairbanks, AK 99709
>>>> (907) 450-7250 x293
>>>> -----------------------------------------------
>>>>>
>>>>> --
>>>>> Niko




More information about the smokeping-users mailing list