OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-IO-Socket-INET6?expand=0&rev=5
This commit is contained in:
parent
b4c0b36aa4
commit
8f3f6e8c74
62
perl-IO-Socket-INET6-2.54-family.diff
Normal file
62
perl-IO-Socket-INET6-2.54-family.diff
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
--- 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";
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 25 14:18:08 CET 2008 - anicka@suse.cz
|
Mon Feb 25 14:18:08 CET 2008 - anicka@suse.cz
|
||||||
|
|
||||||
|
@ -2,9 +2,16 @@
|
|||||||
# spec file for package perl-IO-Socket-INET6 (Version 2.54)
|
# spec file for package perl-IO-Socket-INET6 (Version 2.54)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# 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/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -14,14 +21,15 @@
|
|||||||
Name: perl-IO-Socket-INET6
|
Name: perl-IO-Socket-INET6
|
||||||
BuildRequires: perl-Socket6
|
BuildRequires: perl-Socket6
|
||||||
Version: 2.54
|
Version: 2.54
|
||||||
Release: 1
|
Release: 37
|
||||||
Requires: perl = %{perl_version}
|
Requires: perl = %{perl_version}
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Url: http://cpan.org/modules/by-module/IO/
|
Url: http://cpan.org/modules/by-module/IO/
|
||||||
License: Artistic License
|
License: Artistic License
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Source: IO-Socket-INET6-%{version}.tar.bz2
|
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
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -38,6 +46,7 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n IO-Socket-INET6-%{version} -q
|
%setup -n IO-Socket-INET6-%{version} -q
|
||||||
|
%patch
|
||||||
|
|
||||||
%build
|
%build
|
||||||
perl Makefile.PL
|
perl Makefile.PL
|
||||||
@ -63,6 +72,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/var/adm/perl-modules/*
|
/var/adm/perl-modules/*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Mon Feb 25 2008 anicka@suse.cz
|
||||||
- update to 2.54
|
- update to 2.54
|
||||||
* Added pack_sockaddr_in6_all to the imports from Socket6 to fix
|
* Added pack_sockaddr_in6_all to the imports from Socket6 to fix
|
||||||
@ -78,7 +90,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
* bugfixes, test fixes
|
* bugfixes, test fixes
|
||||||
* Wed Jan 25 2006 mls@suse.de
|
* Wed Jan 25 2006 mls@suse.de
|
||||||
- converted neededforbuild to BuildRequires
|
- converted neededforbuild to BuildRequires
|
||||||
* Wed Sep 28 2005 dmueller@suse.de
|
* Thu Sep 29 2005 dmueller@suse.de
|
||||||
- add norootforbuild
|
- add norootforbuild
|
||||||
* Thu Sep 15 2005 anicka@suse.cz
|
* Thu Sep 15 2005 anicka@suse.cz
|
||||||
- package created
|
- package created
|
||||||
|
Loading…
x
Reference in New Issue
Block a user