Skip Menu |

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

Report information
The Basics
Id: 81216
Status: resolved
Priority: 0/
Queue: IO-Socket-SSL

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

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



Subject: Not all systems define AF_INET6
 For instance on HP-UX B.11.00 evaluating AF_INET6 croaks with 'Your vendor has not defined Socket macro AF_INET6'.  This cause this failure and noise during 'make test':

t/sessions.t ............... 1/35 Use of uninitialized value $addr in substitution (s///) at /home/gisle/IO-Socket-SSL/blib/lib/IO/Socket/SSL.pm line 1674.
Use of uninitialized value $addr in concatenation (.) or string at /home/gisle/IO-Socket-SSL/blib/lib/IO/Socket/SSL.pm line 1675.
Use of uninitialized value $addr in substitution (s///) at /home/gisle/IO-Socket-SSL/blib/lib/IO/Socket/SSL.pm line 1674.
Use of uninitialized value $addr in concatenation (.) or string at /home/gisle/IO-Socket-SSL/blib/lib/IO/Socket/SSL.pm line 1675.
Use of uninitialized value $addr in substitution (s///) at /home/gisle/IO-Socket-SSL/blib/lib/IO/Socket/SSL.pm line 1674.
Use of uninitialized value $addr in concatenation (.) or string at /home/gisle/IO-Socket-SSL/blib/lib/IO/Socket/SSL.pm line 1675.
Use of uninitialized value in string ne at t/sessions.t line 152.
Use of uninitialized value in string ne at t/sessions.t line 159.
t/sessions.t ............... Failed 3/35 subtests 

Patch with suggested fix attached.
 
Subject: IO-Socket-SSL-AF_INET6.patch
From 28e10f533796931a1c4e728c93680c7580d3bc9a Mon Sep 17 00:00:00 2001 From: Gisle Aas <gisle@activestate.com> Date: Thu, 15 Nov 2012 14:10:20 -0800 Subject: [PATCH] Not all systems define AF_INET6 On HP-UX this croaks with 'Your vendor has not defined Socket macro AF_INET6'. This could potentially be written more clearly as: if (defined(&AF_INET6) && af == AF_INET6) { but I could not convince myself that there wasn't perl's that would autoload these constants making the defined test useless. --- SSL.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/SSL.pm b/SSL.pm index 89acb39..b98441e 100644 --- a/SSL.pm +++ b/SSL.pm @@ -527,7 +527,7 @@ sub _update_peer { eval { my $sockaddr = getpeername( $self ); my $af = sockaddr_family($sockaddr); - if( $af == AF_INET6 ) { + if( $af == (eval { AF_INET6 } || 0) && !$@ ) { my ($port, $addr, $scope, $flow ) = unpack_sockaddr_in6( $sockaddr ); $arg_hash->{PeerAddr} = inet_ntop( $af, $addr ); $arg_hash->{PeerPort} = $port; -- 1.7.0.5
On Thu Nov 15 17:51:47 2012, GAAS wrote: Show quoted text
> For instance on HP-UX B.11.00 evaluating AF_INET6 croaks with 'Your > vendor has > not defined Socket macro AF_INET6'. This cause this failure and noise > during > 'make test':
Thanks for reporting. Should be hopefully fixed in 1.78.