Hello community, here is the log from the commit of package perl-IO-Socket-INET6 checked in at Mon Oct 6 19:28:19 CEST 2008. -------- --- perl-IO-Socket-INET6/perl-IO-Socket-INET6.changes 2008-02-25 14:18:29.000000000 +0100 +++ /mounts/work_src_done/STABLE/perl-IO-Socket-INET6/perl-IO-Socket-INET6.changes 2008-10-06 13:39:11.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Oct 6 13:35:12 CEST 2008 - anicka@suse.cz + +- do not try to bind when we have AF_INET6 one one side and + AF_INET on the other side and fix test failures (-family.diff) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- perl-IO-Socket-INET6-2.54-family.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-IO-Socket-INET6.spec ++++++ --- /var/tmp/diff_new_pack.kt4297/_old 2008-10-06 19:27:56.000000000 +0200 +++ /var/tmp/diff_new_pack.kt4297/_new 2008-10-06 19:27:56.000000000 +0200 @@ -2,9 +2,16 @@ # spec file for package perl-IO-Socket-INET6 (Version 2.54) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -14,14 +21,15 @@ Name: perl-IO-Socket-INET6 BuildRequires: perl-Socket6 Version: 2.54 -Release: 1 +Release: 37 Requires: perl = %{perl_version} AutoReqProv: on Url: http://cpan.org/modules/by-module/IO/ License: Artistic License Group: Development/Libraries/Perl Source: IO-Socket-INET6-%{version}.tar.bz2 -Summary: Provides an object interface to creating and using sockets. +Patch: %{name}-%{version}-family.diff +Summary: Provides an object interface to creating and using sockets BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -38,6 +46,7 @@ %prep %setup -n IO-Socket-INET6-%{version} -q +%patch %build perl Makefile.PL @@ -63,6 +72,9 @@ /var/adm/perl-modules/* %changelog +* Mon Oct 06 2008 anicka@suse.cz +- do not try to bind when we have AF_INET6 one one side and + AF_INET on the other side and fix test failures (-family.diff) * Mon Feb 25 2008 anicka@suse.cz - update to 2.54 * Added pack_sockaddr_in6_all to the imports from Socket6 to fix @@ -78,7 +90,7 @@ * bugfixes, test fixes * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Wed Sep 28 2005 dmueller@suse.de +* Thu Sep 29 2005 dmueller@suse.de - add norootforbuild * Thu Sep 15 2005 anicka@suse.cz - package created ++++++ perl-IO-Socket-INET6-2.54-family.diff ++++++ --- lib/IO/Socket/INET6.pm +++ lib/IO/Socket/INET6.pm @@ -148,12 +148,6 @@ $proto ||= (getprotobyname('tcp'))[2]; $type = $arg->{Type} || $socket_type{(getprotobynumber($proto))[0]}; - my @lres = (); - @lres = getaddrinfo($laddr,$lport,$family,$type,$proto,AI_PASSIVE); - - return _error($sock, $EINVAL, "getaddrinfo: $lres[0]") - unless(scalar(@lres)>=5); - $arg->{PeerAddr} = $arg->{PeerHost} if exists $arg->{PeerHost} && !exists $arg->{PeerAddr}; @@ -164,17 +158,40 @@ } $sock->blocking($arg->{Blocking}) if defined $arg->{Blocking}; - + my @families; + if ($family == AF_UNSPEC){ + @families = (AF_INET6, AF_INET); + } else { + @families = ($family); + } + + my $ok = 0; + my $msg; + my @lres = (); my @rres = (); - if (defined $raddr) { - @rres = getaddrinfo($raddr,$rport,$family,$type,$proto,AI_PASSIVE); - return _error($sock, $EINVAL, "getaddrinfo: $rres[0]") - unless (scalar(@rres)>=5); + for my $fam (@families) { + @lres = getaddrinfo($laddr,$lport,$fam,$type,$proto,AI_PASSIVE); + if (scalar(@lres)<5){ + $msg = $lres[0]; + next; + } + if (defined $raddr) { + @rres = getaddrinfo($raddr,$rport,$fam,$type,$proto,AI_PASSIVE); + if (scalar(@rres)>=5){ + $ok = 1; + last; + } else { + $msg = $rres[0]; + } + } else { + $ok = 1; + last; + } } + return _error($sock, $EINVAL, "getaddrinfo: $msg") unless $ok; while(1) { - $family = (exists $arg->{PeerAddr})? ($rres[0]):($lres[0]) ; # One concrete family. #printf "DEBUG $family \n"; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de