Check /etc/hosts before DNS when doing arp entry name lookup

This commit is contained in:
Oliver Gorwits
2014-01-19 16:13:51 +00:00
parent 078449d56d
commit dc17857d86
5 changed files with 11 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ use strict;
use warnings FATAL => 'all';
use Net::DNS;
use AnyEvent::DNS::EtcHosts;
use AnyEvent::DNS;
use base 'Exporter';

View File

@@ -91,7 +91,7 @@ sub check_acl {
next unless $device->in_storage;
# lazy version of vendor: and model:
if ($device->can($prop) and defined $device->prop
if ($device->can($prop) and defined $device->$prop
and $device->$prop =~ m/^$match$/) {
return 1;
}