Skip Menu |
 

This queue is for tickets about the IO-Socket-INET6 CPAN distribution.

Report information
The Basics
Id: 101379
Status: new
Priority: 0/
Queue: IO-Socket-INET6

People
Owner: Nobody in particular
Requestors: oleg [...] cpan.org
Cc:
AdminCc:

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

Attachments


Subject: Should configure() return fail when MultiHomed enabled and there is no address where we can connect to?
Download (untitled) / with headers
text/plain 641b
I have this test script use strict; use lib 'IO-Socket-INET6-2.72/lib/'; use IO::Socket::INET6; my $sock = IO::Socket::INET6->new(PeerAddr => '127.0.0.1', PeerPort => 1, MultiHomed => 0) or die $@; warn "Connected successfully"; __END__ And it shows "IO::Socket::INET6: connect: Connection refused at t.pl line 5." But if I'll change `MultiHomed' to 1 it will show: "Connected successfully at t.pl line 8." In fact socket was not connected but constructor returns success. This is because there is no end of array of addresses check when `MultiHomed' is true. So, after applying of the attached patch it will die at line 5 as expected
Subject: multihomed-end-check.patch
--- lib/IO/Socket/INET6.pm.orig 2015-01-07 23:19:11.163130587 +0600 +++ lib/IO/Socket/INET6.pm 2015-01-07 23:16:55.850469080 +0600 @@ -281,7 +281,7 @@ last if $sock->connect($rres); return _error($sock, $!, $@ || "Timeout") - if ! $arg->{MultiHomed}; + if ! $arg->{MultiHomed} || $flr == $flr[-1]; }


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.