release 2.028005
This commit is contained in:
@@ -4,7 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
use 5.010_000;
|
||||
|
||||
our $VERSION = '2.028004';
|
||||
our $VERSION = '2.028005';
|
||||
use App::Netdisco::Configuration;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
@@ -85,7 +85,7 @@ sub ipv4_from_hostname {
|
||||
return unless $name;
|
||||
|
||||
# check /etc/hosts file and short-circuit if found
|
||||
if (exists $HOSTS{$name}) {
|
||||
if (exists $HOSTS{$name} and $HOSTS{$name}->[0]->[0]) {
|
||||
my $ip = NetAddr::IP::Lite->new($HOSTS{$name}->[0]->[0]);
|
||||
return $ip->addr if $ip and $ip->bits == 32;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user