-# $OpenBSD: Client.pm,v 1.13 2020/11/07 16:02:19 bluhm Exp $
+# $OpenBSD: Client.pm,v 1.14 2021/12/22 11:50:28 bluhm Exp $
-# Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org>
+# Copyright (c) 2010-2021 Alexander Bluhm <bluhm@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
use Carp;
use Socket qw(:DEFAULT IPPROTO_TCP TCP_NODELAY);
use Socket6;
-use IO::Socket;
-use IO::Socket::INET6;
+use IO::Socket::IP;
use IO::Socket::SSL;
sub new {
delete $self->{cs};
$SSL_ERROR = "";
- my $iosocket = $self->{ssl} ? "IO::Socket::SSL" : "IO::Socket::INET6";
+ my $iosocket = $self->{ssl} ? "IO::Socket::SSL" : "IO::Socket::IP";
my $cs = $iosocket->new(
Proto => "tcp",
Domain => $self->{connectdomain},
+ # IO::Socket::IP calls the domain family
+ Family => $self->{connectdomain},
PeerAddr => $self->{connectaddr},
PeerPort => $self->{connectport},
SSL_verify_mode => SSL_VERIFY_NONE,
-# Copyright (c) 2010-2017 Alexander Bluhm <bluhm@openbsd.org>
+# Copyright (c) 2010-2021 Alexander Bluhm <bluhm@openbsd.org>
# Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
-# $OpenBSD: Makefile,v 1.19 2021/12/02 17:10:53 kn Exp $
+# $OpenBSD: Makefile,v 1.20 2021/12/22 11:50:28 bluhm Exp $
# The following ports must be installed for the regression tests:
-# p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets
# p5-Socket6 Perl defines relating to AF_INET6 sockets
# p5-IO-Socket-SSL perl interface to SSL sockets
#
# are missing print a warning and skip the tests, but do not fail.
PERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \
- eval { require IO::Socket::INET6 } or print $@; \
eval { require Socket6 } or print $@; \
eval { require IO::Socket::SSL } or print $@; \
'
.if ! empty (PERL_REQUIRE)
regress:
@echo "${PERL_REQUIRE}"
- @echo 'run "pkg_add p5-IO-Socket-INET6 p5-Socket6 p5-Socket-SSL"'
+ @echo 'run "pkg_add p5-Socket6 p5-Socket-SSL"'
@echo SKIPPED
.endif
-# $OpenBSD: Server.pm,v 1.14 2020/11/07 16:02:20 bluhm Exp $
+# $OpenBSD: Server.pm,v 1.15 2021/12/22 11:50:28 bluhm Exp $
-# Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org>
+# Copyright (c) 2010-2021 Alexander Bluhm <bluhm@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
use Config;
use Socket qw(:DEFAULT IPPROTO_TCP TCP_NODELAY);
use Socket6;
-use IO::Socket;
-use IO::Socket::INET6;
+use IO::Socket::IP;
use IO::Socket::SSL;
sub new {
$self->{listendomain}
or croak "$class listen domain not given";
$SSL_ERROR = "";
- my $iosocket = $self->{ssl} ? "IO::Socket::SSL" : "IO::Socket::INET6";
+ my $iosocket = $self->{ssl} ? "IO::Socket::SSL" : "IO::Socket::IP";
my $ls = $iosocket->new(
Proto => "tcp",
ReuseAddr => 1,
Domain => $self->{listendomain},
+ # IO::Socket::IP calls the domain family
+ Family => $self->{listendomain},
$self->{listenaddr} ? (LocalAddr => $self->{listenaddr}) : (),
$self->{listenport} ? (LocalPort => $self->{listenport}) : (),
SSL_server => 1,
-# $OpenBSD: funcs.pl,v 1.24 2021/03/24 21:03:06 benno Exp $
+# $OpenBSD: funcs.pl,v 1.25 2021/12/22 11:50:28 bluhm Exp $
-# Copyright (c) 2010-2017 Alexander Bluhm <bluhm@openbsd.org>
+# Copyright (c) 2010-2021 Alexander Bluhm <bluhm@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
use Socket;
use Socket6;
use IO::Socket;
-use IO::Socket::INET6;
+use IO::Socket::IP;
sub find_ports {
my %args = @_;
my @sockets = (1..$num);
foreach my $s (@sockets) {
- $s = IO::Socket::INET6->new(
+ $s = IO::Socket::IP->new(
Proto => "tcp",
- Domain => $domain,
+ Family => $domain,
$addr ? (LocalAddr => $addr) : (),
) or die "find_ports: create and bind socket failed: $!";
}