#393 avoid "modification of readonly variable" error in netmap

This commit is contained in:
Oliver Gorwits
2018-04-18 21:11:54 +01:00
parent 2caae8a642
commit f2ebd07c07
2 changed files with 4 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
[BUG FIXES]
* #393 avoid 'modification of readonly variable' error in netmap
* clean up check_mac() interface (ml-cms)
2.039021 - 2018-04-10

View File

@@ -6,6 +6,7 @@ use Dancer::Plugin::DBIC;
use Dancer::Plugin::Auth::Extensible;
use SNMP::Info ();
use Storable 'dclone';
use List::Util 'first';
use List::MoreUtils ();
use App::Netdisco::Util::Permission 'check_acl_only';
@@ -96,7 +97,8 @@ sub make_node_infostring {
}
sub make_link_infostring {
my $link = shift or return '';
my $linkarg = shift or return '';
my $link = dclone $link;
my $domain = quotemeta( setting('domain_suffix') || '' );
(my $left_name = lc($link->{left_dns} || $link->{left_name} || $link->{left_ip})) =~ s/$domain$//;