Hi,
Using IO::Socket::INET6 fails when creating raw sockets. Our
getaddrinfo() seems to behave more strictly. This is not related
to new perl or new resolver. I was also broken in OpenBSD 5.0.
ok?
bluhm
Index: net/p5-IO-Socket-INET6/Makefile
===================================================================
RCS file: /data/mirror/openbsd/cvs/ports/net/p5-IO-Socket-INET6/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- net/p5-IO-Socket-INET6/Makefile 11 Mar 2013 11:35:50 -0000 1.12
+++ net/p5-IO-Socket-INET6/Makefile 30 Mar 2013 03:05:52 -0000
@@ -3,6 +3,7 @@
COMMENT = object interface for AF_INET and AF_INET6 domain sockets
DISTNAME = IO-Socket-INET6-2.69
+REVISION = 1
CATEGORIES = net
@@ -14,6 +15,6 @@ PERMIT_PACKAGE_CDROM = Yes
MODULES = cpan
BUILD_DEPENDS = ${RUN_DEPENDS}
RUN_DEPENDS = net/p5-Socket6>=0.12
-TEST_DEPENDS = devel/p5-Test-Pod-Coverage devel/p5-Test-Pod
+TEST_DEPENDS = devel/p5-Test-Pod-Coverage devel/p5-Test-Pod
.include <bsd.port.mk>
Index: net/p5-IO-Socket-INET6/patches/patch-lib_IO_Socket_INET6_pm
===================================================================
RCS file: net/p5-IO-Socket-INET6/patches/patch-lib_IO_Socket_INET6_pm
diff -N net/p5-IO-Socket-INET6/patches/patch-lib_IO_Socket_INET6_pm
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/p5-IO-Socket-INET6/patches/patch-lib_IO_Socket_INET6_pm 30 Mar 2013
13:23:14 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+The OpenBSD getaddrinfo() does not allow any port number for raw
+sockets. Avoid a 'service not supported for ai_socktype' error and
+use '' instead of 0 in this case.
+
+--- lib/IO/Socket/INET6.pm.orig Mon Nov 28 13:57:54 2011
++++ lib/IO/Socket/INET6.pm Sat Mar 30 04:17:38 2013
+@@ -152,11 +152,11 @@ sub configure {
+ $arg->{LocalPort},
+ $arg->{Proto}
+ ) or return _error($sock, $!, "sock_info: $@");
+- $laddr ||= '';
+- $lport ||= 0;
+ $proto ||= (getprotobyname('tcp'))[2];
++ my $type = $arg->{Type} || $socket_type{(getprotobynumber($proto))[0]};
++ $laddr ||= '';
++ $lport ||= $type == SOCK_RAW ? '' : 0;
+
+-
+ # MSWin32 expects at least one of $laddr or $lport to be specified
+ # and does not accept 0 for $lport if $laddr is specified.
+ if ($^O eq 'MSWin32') {
+@@ -167,8 +167,6 @@ sub configure {
+ $lport = '';
+ }
+ }
+-
+- my $type = $arg->{Type} || $socket_type{(getprotobynumber($proto))[0]};
+
+ # parse Peer*
+ my($rport,$raddr);