Skip Menu |

This queue is for tickets about the Net-Ping CPAN distribution.

Report information
The Basics
Id: 5861
Status: resolved
Priority: 0/
Queue: Net-Ping

People
Owner: Nobody in particular
Requestors: Mike.Mitchell [...] sas.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.31
Fixed in: (no value)



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.

On Wed Mar 31 15:56:31 2004, guest wrote: Show quoted text
> 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.
Thanks for the patches. I've used a different patch for a fix to bug report #4170. I'm also looking into your fix for RT #5269. If it checks out OK, I'll include it in the next release. Right now, I'm wondering if the problem you are seeing is related to Perl core RT #33664. Do you happen to remember if you were using Windows 2003 or XP SP2?
Subject: RE: [rt.cpan.org #5861] icmp failures under Windows
Date: Mon, 6 Aug 2007 10:01:07 -0400
To: <bug-Net-Ping [...] rt.cpan.org>
From: "Mike Mitchell" <Mike.Mitchell [...] sas.com>
I'm fairly certain I was running it on Windows 2003. I'm glad to see that someone has started maintaining the code. Thanks for your efforts! -- Mike Mitchell Show quoted text
-----Original Message----- From: Steve Peters via RT [mailto:bug-Net-Ping@rt.cpan.org] Sent: Monday, August 06, 2007 9:45 AM To: Mike Mitchell Subject: [rt.cpan.org #5861] icmp failures under Windows <URL: http://rt.cpan.org/Ticket/Display.html?id=5861 > On Wed Mar 31 15:56:31 2004, guest wrote:
> 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.
Thanks for the patches. I've used a different patch for a fix to bug report #4170. I'm also looking into your fix for RT #5269. If it checks out OK, I'll include it in the next release. Right now, I'm wondering if the problem you are seeing is related to Perl core RT #33664. Do you happen to remember if you were using Windows 2003 or XP SP2?
This was fixed in 2.64 by CIORNII by adding the NIx_NOSERV flag.