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

@@ -2,7 +2,11 @@
[NEW FEATURES]
*
* Support for Link Aggregation (port-channel, etherchannel, "trunking", etc)
[ENHANCEMENTS]
* [#82] Check /etc/hosts before DNS when doing arp entry name lookup
[BUG FIXES]

View File

@@ -22,6 +22,7 @@ no_index:
requires:
Algorithm::Cron: 0.07
AnyEvent: 7.05
AnyEvent::DNS::EtcHosts: 0
App::cpanminus: 1.6108
App::local::lib::helper: 0.07
Archive::Extract: 0
@@ -50,7 +51,7 @@ requires:
Plack: 1.0023
Plack::Middleware::Expires: 0.03
Role::Tiny: 1.002005
SNMP::Info: 3.1
SNMP::Info: 3.11
SQL::Translator: 0.11016
Socket6: 0.23
Starman: 0.4008

View File

@@ -6,6 +6,7 @@ all_from 'lib/App/Netdisco.pm';
requires 'Algorithm::Cron' => 0.07;
requires 'AnyEvent' => 7.05;
requires 'AnyEvent::DNS::EtcHosts' => 0;
requires 'App::cpanminus' => 1.6108;
requires 'App::local::lib::helper' => 0.07;
requires 'Archive::Extract' => 0;
@@ -36,7 +37,7 @@ requires 'Plack::Middleware::Expires' => 0.03;
requires 'Role::Tiny' => 1.002005;
requires 'Socket6' => 0.23;
requires 'Starman' => 0.4008;
requires 'SNMP::Info' => 3.10;
requires 'SNMP::Info' => 3.11;
requires 'SQL::Translator' => 0.11016;
requires 'Template' => 2.24;
requires 'Template::Plugin::CSV' => 0.04;

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;
}