Skip Menu |

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

Report information
The Basics
Id: 55180
Status: new
Priority: 0/
Queue: Net-RawIP

Owner: Nobody in particular
Requestors: jcombe [...]

Bug Information
Severity: Important
Broken in: 0.25
Fixed in: (no value)

Download (untitled) / with headers
text/plain 1.2k
When using the send subroutine in this module and connecting to an IP address that the "ping" tool on the command line reports as "Network is unreachable" the code always ends with this message:- sendto() at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Net/ line 630. There does not seem to be any way to catch this error and prevent the code from ending. I would consider this a bug that there is no way to detect errors in this call and handle them, as the code always causes the script to end. Sample script that causes the issue on the network I am using:- #!/usr/bin/perl -w use strict; use Net::RawIP qw(:pcap); my $srcIP = ""; my $dstIP = ""; my $b = new Net::RawIP ({icmp =>{}}); $b->set({ip => {saddr => $srcIP, daddr => $dstIP}, icmp => {type => 8, id => $$} }); $b->set({icmp => {data => "............aaaaaaaaaa..".timem()}}); $b->send(0,1); Using perl version 5.8.8 on CentOS 5.4 The bug appears to be the croak statements in util.c:- void pkt_send (int fd, unsigned char * sock,u_char *pkt,int size) { if (sendto (fd, (const void *)pkt,size, 0, (const struct sockaddr *) sock, sizeof (struct sockaddr)) < 0) { close (fd); croak("sendto()"); } } Commenting out the croak in the code above and re-compiling works around the problem.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to