Skip Menu |
 

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

Report information
The Basics
Id: 98640
Status: resolved
Priority: 0/
Queue: IO-Socket-IP

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

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

Attachments


Subject: [PATCH] AIX 5 needs port zero
Download (untitled) / with headers
text/plain 324b
In AIX 5 the IO::Socket::IP tests die: http://www.nntp.perl.org/group/perl.daily-build.reports/2014/08/msg166050.html http://doc.procura.nl/smoke/aix5300/511/cc/mktest.rpt unless the server socket is bound to port zero (i.e. give me any port). The attached patch seemed to work for Michael Felt (the first report above).
Subject: 0001-Bind-to-local-port-zero.patch
From c08882121a3fed7d101c4e617911a1a7581117fc Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi <jhi@iki.fi> Date: Fri, 5 Sep 2014 07:10:17 -0400 Subject: [PATCH] Bind to local port zero. Seems to help in AIX: patch from Michael Felt. --- cpan/IO-Socket-IP/t/02local-server-v4.t | 1 + cpan/IO-Socket-IP/t/03local-cross-v4.t | 1 + cpan/IO-Socket-IP/t/05local-server-v6.t | 1 + cpan/IO-Socket-IP/t/06local-cross-v6.t | 1 + 4 files changed, 4 insertions(+) diff --git a/cpan/IO-Socket-IP/t/02local-server-v4.t b/cpan/IO-Socket-IP/t/02local-server-v4.t index d1f2b40..bca5b83 100644 --- a/cpan/IO-Socket-IP/t/02local-server-v4.t +++ b/cpan/IO-Socket-IP/t/02local-server-v4.t @@ -27,6 +27,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { my $testserver = IO::Socket::IP->new( ( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ), LocalHost => "127.0.0.1", + Port => 0, Type => Socket->$socktype, ); diff --git a/cpan/IO-Socket-IP/t/03local-cross-v4.t b/cpan/IO-Socket-IP/t/03local-cross-v4.t index 532b78c..4d75d95 100644 --- a/cpan/IO-Socket-IP/t/03local-cross-v4.t +++ b/cpan/IO-Socket-IP/t/03local-cross-v4.t @@ -11,6 +11,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { my $testserver = IO::Socket::IP->new( ( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ), LocalHost => "127.0.0.1", + Port => 0, Type => Socket->$socktype, ) or die "Cannot listen on PF_INET - $@"; diff --git a/cpan/IO-Socket-IP/t/05local-server-v6.t b/cpan/IO-Socket-IP/t/05local-server-v6.t index 22ee59e..27664b6 100644 --- a/cpan/IO-Socket-IP/t/05local-server-v6.t +++ b/cpan/IO-Socket-IP/t/05local-server-v6.t @@ -33,6 +33,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { my $testserver = IO::Socket::IP->new( ( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ), LocalHost => "::1", + Port => 0, Type => Socket->$socktype, GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ); diff --git a/cpan/IO-Socket-IP/t/06local-cross-v6.t b/cpan/IO-Socket-IP/t/06local-cross-v6.t index c4842b7..8d40f4a 100644 --- a/cpan/IO-Socket-IP/t/06local-cross-v6.t +++ b/cpan/IO-Socket-IP/t/06local-cross-v6.t @@ -14,6 +14,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { my $testserver = IO::Socket::IP->new( ( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ), LocalHost => "::1", + Port => 0, Type => Socket->$socktype, ) or die "Cannot listen on PF_INET6 - $@"; -- 2.1.0
Download (untitled) / with headers
text/plain 445b
On Fri Sep 05 09:24:23 2014, JHI wrote: Show quoted text
> In AIX 5 the IO::Socket::IP tests die: > > http://www.nntp.perl.org/group/perl.daily- > build.reports/2014/08/msg166050.html > http://doc.procura.nl/smoke/aix5300/511/cc/mktest.rpt > > unless the server socket is bound to port zero (i.e. give me any > port). > > The attached patch seemed to work for Michael Felt (the first report > above).
Thanks. Merged, will be in next release. -- Paul Evans
Released -- Paul Evans


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.