remove implicit op:and from device_identity lhs check
This commit is contained in:
@@ -66,12 +66,10 @@ sub set_canonical_ip {
|
|||||||
ALIAS: while (my $alias = $devips->next) {
|
ALIAS: while (my $alias = $devips->next) {
|
||||||
next if $alias->alias eq $old_ip;
|
next if $alias->alias eq $old_ip;
|
||||||
|
|
||||||
foreach my $this (keys %$idmap) {
|
foreach my $key (keys %$idmap) {
|
||||||
my $anded_this = [(ref $this ? @$this : $this), 'op:and'];
|
|
||||||
|
|
||||||
# lhs of device_identity matches device, rhs matches device_ip
|
# lhs of device_identity matches device, rhs matches device_ip
|
||||||
if (check_acl($device, $anded_this)
|
if (check_acl($device, $key)
|
||||||
and check_acl($alias, $idmap->{$this})) {
|
and check_acl($alias, $idmap->{$key})) {
|
||||||
$new_ip = $alias->alias;
|
$new_ip = $alias->alias;
|
||||||
last ALIAS;
|
last ALIAS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user