From 5845290fe6de99847780faaf94d2e83258f798bb Mon Sep 17 00:00:00 2001 From: bluhm Date: Wed, 22 Dec 2021 15:14:13 +0000 Subject: [PATCH] Replace deprecated IO::Socket::INET6 with IO::Socket::IP. --- regress/usr.sbin/syslogd/Client.pm | 7 +++---- regress/usr.sbin/syslogd/Makefile | 6 ++---- regress/usr.sbin/syslogd/Server.pm | 7 +++---- regress/usr.sbin/syslogd/args-client-tcp-deferred.pl | 3 +-- regress/usr.sbin/syslogd/args-tls-cert-empty.pl | 2 +- regress/usr.sbin/syslogd/args-tls-cert-noexist.pl | 2 +- regress/usr.sbin/syslogd/args-tls-key-empty.pl | 2 +- regress/usr.sbin/syslogd/args-tls-key-noexist.pl | 2 +- regress/usr.sbin/syslogd/funcs.pl | 7 +++---- 9 files changed, 16 insertions(+), 22 deletions(-) diff --git a/regress/usr.sbin/syslogd/Client.pm b/regress/usr.sbin/syslogd/Client.pm index de880329336..db496fd9bb9 100644 --- a/regress/usr.sbin/syslogd/Client.pm +++ b/regress/usr.sbin/syslogd/Client.pm @@ -1,6 +1,6 @@ -# $OpenBSD: Client.pm,v 1.15 2021/03/09 15:16:28 bluhm Exp $ +# $OpenBSD: Client.pm,v 1.16 2021/12/22 15:14:13 bluhm Exp $ -# Copyright (c) 2010-2020 Alexander Bluhm +# Copyright (c) 2010-2021 Alexander Bluhm # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -23,7 +23,6 @@ use Carp; use Socket; use Socket6; use IO::Socket; -use IO::Socket::INET6; use IO::Socket::SSL; use Sys::Syslog qw(:standard :extended :macros); @@ -69,7 +68,7 @@ sub child { } else { $SSL_ERROR = ""; my $iosocket = $self->{connectproto} eq "tls" ? - "IO::Socket::SSL" : "IO::Socket::INET6"; + "IO::Socket::SSL" : "IO::Socket::IP"; my $proto = $self->{connectproto}; $proto = "tcp" if $proto eq "tls"; $cs = $iosocket->new( diff --git a/regress/usr.sbin/syslogd/Makefile b/regress/usr.sbin/syslogd/Makefile index 22a67323846..ea050a83dc2 100644 --- a/regress/usr.sbin/syslogd/Makefile +++ b/regress/usr.sbin/syslogd/Makefile @@ -1,7 +1,6 @@ -# $OpenBSD: Makefile,v 1.33 2021/12/02 15:56:15 kn Exp $ +# $OpenBSD: Makefile,v 1.34 2021/12/22 15:14:13 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 # p5-BSD-Resource BSD process resource limit and priority functions @@ -13,7 +12,6 @@ # 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 $@; \ eval { require BSD::Resource } or print $@; \ @@ -21,7 +19,7 @@ PERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \ .if ! empty (PERL_REQUIRE) regress: @echo "${PERL_REQUIRE}" - @echo 'run "pkg_add p5-IO-Socket-INET6 p5-Socket6 p5-IO-Socket-SSL p5-BSD-Reource"' + @echo 'run "pkg_add p5-Socket6 p5-IO-Socket-SSL p5-BSD-Reource"' @echo SKIPPED .endif diff --git a/regress/usr.sbin/syslogd/Server.pm b/regress/usr.sbin/syslogd/Server.pm index 3432253f1b9..655f766c7db 100644 --- a/regress/usr.sbin/syslogd/Server.pm +++ b/regress/usr.sbin/syslogd/Server.pm @@ -1,6 +1,6 @@ -# $OpenBSD: Server.pm,v 1.13 2020/10/16 22:46:45 bluhm Exp $ +# $OpenBSD: Server.pm,v 1.14 2021/12/22 15:14:13 bluhm Exp $ -# Copyright (c) 2010-2020 Alexander Bluhm +# Copyright (c) 2010-2021 Alexander Bluhm # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -23,7 +23,6 @@ use Carp; use Socket; use Socket6; use IO::Socket; -use IO::Socket::INET6; use IO::Socket::SSL; sub new { @@ -45,7 +44,7 @@ sub listen { my $self = shift; $SSL_ERROR = ""; my $iosocket = $self->{listenproto} eq "tls" ? - "IO::Socket::SSL" : "IO::Socket::INET6"; + "IO::Socket::SSL" : "IO::Socket::IP"; my $proto = $self->{listenproto}; $proto = "tcp" if $proto eq "tls"; my $ls = $iosocket->new( diff --git a/regress/usr.sbin/syslogd/args-client-tcp-deferred.pl b/regress/usr.sbin/syslogd/args-client-tcp-deferred.pl index f6927cd3887..9631c613eae 100644 --- a/regress/usr.sbin/syslogd/args-client-tcp-deferred.pl +++ b/regress/usr.sbin/syslogd/args-client-tcp-deferred.pl @@ -7,7 +7,6 @@ use strict; use warnings; -use IO::Socket::INET6; our %args = ( client => { @@ -20,7 +19,7 @@ our %args = ( $s[0] = \*STDOUT; # open additional connections until syslogd deferres for (my $i = 1; $i <= 30; $i++) { - $s[$i] = IO::Socket::INET6->new( + $s[$i] = IO::Socket::IP->new( Domain => AF_INET, Proto => "tcp", PeerAddr => "127.0.0.1", diff --git a/regress/usr.sbin/syslogd/args-tls-cert-empty.pl b/regress/usr.sbin/syslogd/args-tls-cert-empty.pl index 23010132e60..70ddd5f1f97 100644 --- a/regress/usr.sbin/syslogd/args-tls-cert-empty.pl +++ b/regress/usr.sbin/syslogd/args-tls-cert-empty.pl @@ -20,7 +20,7 @@ our %args = ( client => { func => sub { my $self = shift; - IO::Socket::INET6->new( + IO::Socket::IP->new( Domain => AF_INET, Proto => "tcp", PeerAddr => "127.0.0.1", diff --git a/regress/usr.sbin/syslogd/args-tls-cert-noexist.pl b/regress/usr.sbin/syslogd/args-tls-cert-noexist.pl index 72c7e731500..b34348d601c 100644 --- a/regress/usr.sbin/syslogd/args-tls-cert-noexist.pl +++ b/regress/usr.sbin/syslogd/args-tls-cert-noexist.pl @@ -20,7 +20,7 @@ our %args = ( client => { func => sub { my $self = shift; - IO::Socket::INET6->new( + IO::Socket::IP->new( Domain => AF_INET, Proto => "tcp", PeerAddr => "127.0.0.1", diff --git a/regress/usr.sbin/syslogd/args-tls-key-empty.pl b/regress/usr.sbin/syslogd/args-tls-key-empty.pl index bf670bf100e..58ac6254ffa 100644 --- a/regress/usr.sbin/syslogd/args-tls-key-empty.pl +++ b/regress/usr.sbin/syslogd/args-tls-key-empty.pl @@ -23,7 +23,7 @@ our %args = ( client => { func => sub { my $self = shift; - IO::Socket::INET6->new( + IO::Socket::IP->new( Domain => AF_INET, Proto => "tcp", PeerAddr => "127.0.0.1", diff --git a/regress/usr.sbin/syslogd/args-tls-key-noexist.pl b/regress/usr.sbin/syslogd/args-tls-key-noexist.pl index b577eee0710..ff1bb9822f1 100644 --- a/regress/usr.sbin/syslogd/args-tls-key-noexist.pl +++ b/regress/usr.sbin/syslogd/args-tls-key-noexist.pl @@ -20,7 +20,7 @@ our %args = ( client => { func => sub { my $self = shift; - IO::Socket::INET6->new( + IO::Socket::IP->new( Domain => AF_INET, Proto => "tcp", PeerAddr => "127.0.0.1", diff --git a/regress/usr.sbin/syslogd/funcs.pl b/regress/usr.sbin/syslogd/funcs.pl index fe3d4397c8e..25b060b64c3 100644 --- a/regress/usr.sbin/syslogd/funcs.pl +++ b/regress/usr.sbin/syslogd/funcs.pl @@ -1,6 +1,6 @@ -# $OpenBSD: funcs.pl,v 1.38 2020/11/06 03:26:18 bluhm Exp $ +# $OpenBSD: funcs.pl,v 1.39 2021/12/22 15:14:13 bluhm Exp $ -# Copyright (c) 2010-2015 Alexander Bluhm +# Copyright (c) 2010-2021 Alexander Bluhm # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -25,7 +25,6 @@ use Socket6; use Sys::Syslog qw(:standard :extended :macros); use Time::HiRes 'sleep'; use IO::Socket; -use IO::Socket::INET6; use IO::Socket::SSL; my $firstlog = "syslogd regress test first message"; @@ -45,7 +44,7 @@ sub find_ports { my @sockets = (1..$num); foreach my $s (@sockets) { - $s = IO::Socket::INET6->new( + $s = IO::Socket::IP->new( Domain => $domain, LocalAddr => $addr, Proto => $proto, -- 2.20.1