Skip Menu |

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

Report information
The Basics
Id: 23153
Status: resolved
Priority: 0/
Queue: Net-Rsh

People
Owner: aslett [...] cpan.org
Requestors: aslett [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: 0.05



Subject: "Connection refused" not handled on port scan
The return code ECONNREFUSED is not handled explicitly by Net:RSh v0.02 The port scan should continue if ECONNREFUSED "Connection refused" is returned, in the same way as for EADDRINUSE "Address already in use". See man listen(2) [Linux Programmer's Manual] for an explanation of how ECONNREFUSED can be returned if the 'backlog' parameter is exceeded. Conditions: any * Distribution name and version: Net::Rsh v0.02 * Perl version: v5.8.7 built for i486-linux-gnu-thread-multi * Operating System: Linux * Linux Distribution: Ubuntu 5.10 (Breezy) * Kernel: 2.6.12-10-386 #1 Fri Sep 15 16:31:49 UTC 2006 i686 GNU/Linux Proposed correction: if ($!{EADDRINUSE} || $!{ECONNREFUSED}) { $port-=1; } else { Test output using additional line of trace: printf("Port: %d - errno: %d: %s\n", $port, $!, $!); Port: 1023 - errno: 98: Address already in use Port: 1022 - errno: 98: Address already in use Port: 1021 - errno: 111: Connection refused
Fixed in latest version! Net-Rsh-0.05.tar.gz