From 1bfebd0bfd5e86f8ed4f770ba54846dc9d18e0ab Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 14 Nov 2012 17:15:08 -0500 Subject: [PATCH] TcpServer, improve IPv6 support, by Michael Holzt --- lib/Qpsmtpd/TcpServer.pm | 2 +- qpsmtpd-forkserver | 4 ---- qpsmtpd-prefork | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/Qpsmtpd/TcpServer.pm b/lib/Qpsmtpd/TcpServer.pm index 42dad62..e4af474 100644 --- a/lib/Qpsmtpd/TcpServer.pm +++ b/lib/Qpsmtpd/TcpServer.pm @@ -14,7 +14,7 @@ if ( # INET6 prior to 2.01 will not work; sorry. eval {require IO::Socket::INET6; IO::Socket::INET6->VERSION("2.00");} ) { - import Socket6; + Socket6->import(qw(inet_ntop)); $has_ipv6=1; } diff --git a/qpsmtpd-forkserver b/qpsmtpd-forkserver index c281a4f..84000f3 100755 --- a/qpsmtpd-forkserver +++ b/qpsmtpd-forkserver @@ -20,10 +20,6 @@ $| = 1; my $has_ipv6 = Qpsmtpd::TcpServer::has_ipv6; -if ($has_ipv6) { - eval 'use Socket6'; -} - # Configuration my $MAXCONN = 15; # max simultaneous connections my @PORT; # port number(s) diff --git a/qpsmtpd-prefork b/qpsmtpd-prefork index c176886..3d018a9 100755 --- a/qpsmtpd-prefork +++ b/qpsmtpd-prefork @@ -31,10 +31,6 @@ defined $Config{sig_name} || die "No signals?"; my $has_ipv6 = Qpsmtpd::TcpServer::has_ipv6; -if ($has_ipv6) { - use Socket6; -} - #use Time::HiRes qw(gettimeofday tv_interval); #get available signals