check_acl call fixes

This commit is contained in:
Oliver Gorwits
2017-05-30 11:38:34 +01:00
parent e0d2517387
commit d007d72015
4 changed files with 8 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ use Net::DNS;
use AnyEvent::DNS;
use NetAddr::IP::Lite ':lower';
use App::Netdisco::Util::Permission 'check_acl';
use App::Netdisco::Util::Permission 'check_acl_no';
use base 'Exporter';
our @EXPORT = ();
@@ -129,7 +129,7 @@ sub hostnames_resolve_async {
IP: foreach my $hash_ref (@$ips) {
my $ip = $hash_ref->{'ip'} || $hash_ref->{'alias'};
next IP if check_acl($ip, $skip);
next IP if check_acl_no($ip, $skip);
# check /etc/hosts file and short-circuit if found
foreach my $name (reverse sort keys %HOSTS) {

View File

@@ -2,7 +2,7 @@ package App::Netdisco::Util::SNMP;
use Dancer qw/:syntax :script/;
use App::Netdisco::Util::Device 'get_device';
use App::Netdisco::Util::Permission qw/check_acl_no check_acl/;
use App::Netdisco::Util::Permission ':all';
use SNMP::Info;
use Try::Tiny;
@@ -300,7 +300,7 @@ sub _build_communities {
if not $stanza->{tag}
and !exists $stanza->{community};
if ($stanza->{$mode} and check_acl($device, $stanza->{only})) {
if ($stanza->{$mode} and check_acl_only($device, $stanza->{only})) {
if ($device->in_storage and
$stored_tag and $stored_tag eq $stanza->{tag}) {
# last known-good by tag