Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Net::IP::XS directly #1053

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ addons:
- liblocale-msgfmt-perl
- libmail-rfc822-address-perl
- libmodule-find-perl
- libnet-ip-perl
- libnet-ip-xs-perl
- libpod-coverage-perl
- libreadonly-perl
- libreadonly-xs-perl
Expand Down
1 change: 1 addition & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ requires
'LWP::UserAgent' => 0,
'Mojolicious' => 7.28,
'Moose' => 2.04,
'Net::IP::XS' => 0,
'Parallel::ForkManager' => 1.12,
'Plack::Builder' => 0,
'Role::Tiny' => 1.001003,
Expand Down
6 changes: 3 additions & 3 deletions lib/Zonemaster/Backend/Validator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use File::Spec::Functions qw( file_name_is_absolute );
use JSON::Validator::Joi;
use Readonly;
use Locale::TextDomain qw[Zonemaster-Backend];
use Zonemaster::Engine::Net::IP;
use Net::IP::XS;
use Zonemaster::Engine::Logger::Entry;
use Zonemaster::LDNS;

Expand Down Expand Up @@ -450,7 +450,7 @@ Accepts an IPv4 address.
sub untaint_ipv4_address {
my ( $value ) = @_;
if ( $value =~ /($IPV4_RE)/
&& Zonemaster::Engine::Net::IP::ip_is_ipv4( $value ) )
&& Net::IP::XS::ip_is_ipv4( $value ) )
{
return $1;
}
Expand All @@ -466,7 +466,7 @@ Accepts an IPv6 address.
sub untaint_ipv6_address {
my ( $value ) = @_;
if ( $value =~ /($IPV6_RE)/
&& Zonemaster::Engine::Net::IP::ip_is_ipv6( $value ) )
&& Net::IP::XS::ip_is_ipv6( $value ) )
{
return $1;
}
Expand Down