1
0
OBS User unknown 2008-10-07 11:07:23 +00:00 committed by Git OBS Bridge
parent 8f3f6e8c74
commit ae211cc988
5 changed files with 22 additions and 71 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:114202e2e7e26800ed8e5955aa80e4f7aac95f90e6f22cd1d83aab2b7d66cfdf
size 11505

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d4473193858569dc44e075f084b94ff1c607ec152bde46d8f0da503ddb284c79
size 11916

View File

@ -1,62 +0,0 @@
--- 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";

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Oct 6 20:33:05 CEST 2008 - anicka@suse.cz
- update to 2.56
* make sure both sides have the same family.
* Fixed problem with connect to IPv4 w/o given domain on FreeBSD6.1 (and
other BSD systems).
- remove -family patch (fixed upstream)
-------------------------------------------------------------------
Mon Oct 6 13:35:12 CEST 2008 - anicka@suse.cz

View File

@ -1,5 +1,5 @@
#
# spec file for package perl-IO-Socket-INET6 (Version 2.54)
# spec file for package perl-IO-Socket-INET6 (Version 2.56)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -20,16 +20,15 @@
Name: perl-IO-Socket-INET6
BuildRequires: perl-Socket6
Version: 2.54
Release: 37
Version: 2.56
Release: 1
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
Patch: %{name}-%{version}-family.diff
Summary: Provides an object interface to creating and using sockets
Source: IO-Socket-INET6-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -46,7 +45,6 @@ Authors:
%prep
%setup -n IO-Socket-INET6-%{version} -q
%patch
%build
perl Makefile.PL
@ -73,6 +71,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Oct 06 2008 anicka@suse.cz
- update to 2.56
* make sure both sides have the same family.
* Fixed problem with connect to IPv4 w/o given domain on FreeBSD6.1 (and
other BSD systems).
- remove -family patch (fixed upstream)
* 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