New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Net::Ping icmp failure with Perl 5.8.6 #7733
Comments
From @spainjaCreated by @spainjaThe following test script, which works with Perl 5.8.4, fails with Perl use Net::Ping; The error message is: icmp socket error - at C:\PingTest.pl line 2 The test script works normally when the protocol in line 2 is changed The problem is consistently reproducible on different machines running Thanks and Happy New Year. Jeffry A. Spain, CCNP Perl Info
|
From @smpetersOn Tue, Jan 04, 2005 at 02:13:56AM -0000, Spain, Jeffry A. wrote:
Are you using the Windows Firewall on Windows XP? The default with the Steve Peters |
The RT System itself - Status changed from 'new' to 'open' |
From nick@ing-simmons.netJeffry A. Spain <perl5-porters@perl.org> writes:
On UNIX sending 'icmp' needs root rights which is approximately Does it work when run from an account which has such rights?
|
From @spainjaThanks. I'm running from local administrator accounts that have full -----Original Message----- Jeffry A. Spain <perl5-porters@perl.org> writes:
On UNIX sending 'icmp' needs root rights which is approximately Does it work when run from an account which has such rights?
|
From @spainjaThank you, Steve. I can reproduce the problem with the Windows firewall The error message arises from the Ping.pm module, lines 148 and 149: There has been no change to the Ping.pm Perl code between versions 5.8.4 I'd be happy to help with further troubleshooting. Please let me know -----Original Message----- On Tue, Jan 04, 2005 at 02:13:56AM -0000, Spain, Jeffry A. wrote:
Are you using the Windows Firewall on Windows XP? The default with the Steve Peters |
From @spainjaI have refined the test script as follows to further isolate the error: use Socket qw( PF_INET SOCK_RAW ); I downloaded and compiled the Perl source for 5.8.5, 5.8.6, and 5.9.1 |
From @spainjaI have further localized the problem to the file \perl-5.8.6\win32 In Perl 5.8.6, win32sck.c, starting in line 406, defines the function On the machines I tested running Windows 2000 Server SP-4, Windows Since Net::Ping.pm constructs its own raw IP packets for ICMP pings, I |
From @spainjaBased on further testing it is apparent that when data returned by the I modified the open_ifs_sockets function in \perl-5.8.6\win32 The attached diff file will patch win32sck.c with the proposed |
From @spainjawin32sck.c.diff422a423,425
> int protocol_matched = 0;
> int i;
> WSAPROTOCOL_INFOA proto_info;
430d432
< int i;
433,439d434
< WSAPROTOCOL_INFOA proto_info;
<
< if ((af != AF_UNSPEC && af != proto_buffers[i].iAddressFamily)
< || (type != proto_buffers[i].iSocketType)
< || (protocol != 0 && protocol != proto_buffers[i].iProtocol))
< continue;
<
443c438,445
< convert_proto_info_w2a(&(proto_buffers[i]), &proto_info);
---
> /* If raw sockets are available for this address family, then
> * allow the creation of a raw socket for any protocol */
> if (af != AF_UNSPEC && af == proto_buffers[i].iAddressFamily
> && type == SOCK_RAW && type == proto_buffers[i].iSocketType)
> {
> protocol_matched = 1;
> break;
> }
445c447,453
< out = WSASocket(af, type, protocol, &proto_info, 0, 0);
---
> /* Otherwise the family, type, and protocol must all match
> * what is available */
> if (af != AF_UNSPEC && af == proto_buffers[i].iAddressFamily
> && type == proto_buffers[i].iSocketType
> && protocol != 0 && protocol == proto_buffers[i].iProtocol)
> {
> protocol_matched = 1;
448a457,463
> }
>
> if (protocol_matched)
> {
> convert_proto_info_w2a(&(proto_buffers[i]), &proto_info);
> out = WSASocket(af, type, protocol, &proto_info, 0, 0);
> }
|
From @spainjaWith additional use, I found that the previously revised win32sck.c |
From @spainja414a415,438
422a447,449
430d456
445c471,477
448a481,487
|
From @steve-m-hayThank you for the bug report. I've just committed a change (24242) to bleadperl which I believe should The code in 5.8.6 currently obtains a list of transport providers and Your original patch broke Net-Telnet because you effectively removed the Likewise, there is another problem with your patch (even the revised The change that I have committed is rather simpler than your patches: I With this change in place, the test script in your original bug report Hopefully this change will make it into the next "stable" release of - Steve |
From @spainjaThanks for fixing this problem. Regards, Jeff. -----Original Message----- Thank you for the bug report. I've just committed a change (24242) to bleadperl which I believe should The code in 5.8.6 currently obtains a list of transport providers and Your original patch broke Net-Telnet because you effectively removed the Likewise, there is another problem with your patch (even the revised The change that I have committed is rather simpler than your patches: I With this change in place, the test script in your original bug report Hopefully this change will make it into the next "stable" release of - Steve |
From @smpeters
As this problem has been resolved, this ticket will be closed. |
@smpeters - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#33664 (status was 'resolved')
Searchable as RT33664$
The text was updated successfully, but these errors were encountered: