Subject: | icmp failures under Windows |
Occasionally my script using Net::Ping will abort from within a sockaddr_in() call. I've traced it to the
($from_port, $from_ip) = sockaddr_in($from_saddr);
call. Windows apparently is sending back nulls for "from_saddr", and perl is aborting the script due to a length error. I'm including a patch that will protect the sockaddr_in() call with a length comparison.
I've also added retries with exponential backoffs to the ping_icmp code, and corrected the exponential backoff code in ping_udp.
I think I've fixed bug report #4170 by passing the destination IP address in the ICMP packet data and verifying in the returned packet.
I think I've fixed bug report #5269 by changing the ICMP checksumming code. I've checked it on HP-UX 10.20, Linux on Intel, and Windows 2003. All three function correctly with both even and odd buffer sizes.
Message body is not shown because it is too large.