develooper Front page | perl.beginners | Postings from May 2007

Net::Ping Bug found?

Thread Next
May 16, 2007 06:01
Net::Ping Bug found?
Message ID:
Hi there!

I am using Net::Ping on AIX (here 5.2) and I noticed a strange behaviour
concerning the ICMP Payload Data Field.

If I do a typical default ping with 
$p = new Net::Ping('icmp', $ping_timeout);
I will get a EthernetII-IP-ICMP-Package (so far so good),
but this package does not contain a Payload field (I would normaly
therefor it contains a Ethernet II Trailer (Wireshark).

(I verified this by using iptrace v2.0 on aix and wireshark on my win2k
desktop box.)

If I do a ping with a manuell specified payload 
(like $p = new Net::Ping('icmp', $ping_timeout, 18);)
the package looks (for me as a halfaway network geek) good.

When is this a problem?
It looks like some Router (by some Vendors) do not send icmp echo 
replies on such kind of requests.
Sometimes it might look like that your router is down, but it isn´t.
(And If you have like me over 1000 multivendor routers/switche/etc to
it´s not funny.)

What could be the Problem:
The package building process in Net::Ping is filthy-> I guess
the IP-Total Length field is not set correctly (the payload lenght is
not added to it). 

So Please:
Could somebody verify this on her/his own System? 

If anybody feels able or have time to patch this, please patch the
multithreadsupport patch right with it.

If you need to verify the fix feel free to ask me. 

Bastian Angerstein

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About