From c4598df24b224728a99cd8f1f60e8a7f31db3258 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 27 May 2017 12:28:34 +0100 Subject: [PATCH] remove implicit op:and from device_identity lhs check --- lib/App/Netdisco/Core/Discover.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/App/Netdisco/Core/Discover.pm b/lib/App/Netdisco/Core/Discover.pm index a2d78c69..3b203c43 100644 --- a/lib/App/Netdisco/Core/Discover.pm +++ b/lib/App/Netdisco/Core/Discover.pm @@ -66,12 +66,10 @@ sub set_canonical_ip { ALIAS: while (my $alias = $devips->next) { next if $alias->alias eq $old_ip; - foreach my $this (keys %$idmap) { - my $anded_this = [(ref $this ? @$this : $this), 'op:and']; - + foreach my $key (keys %$idmap) { # lhs of device_identity matches device, rhs matches device_ip - if (check_acl($device, $anded_this) - and check_acl($alias, $idmap->{$this})) { + if (check_acl($device, $key) + and check_acl($alias, $idmap->{$key})) { $new_ip = $alias->alias; last ALIAS; }