From 2d48243326bfd5793f3600b8cae33fc3dc0e8e24 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 24 Jan 2015 13:43:23 +0000 Subject: [PATCH] another temporary fix for v6 addr / mac addr confusion in NetAddr::MAC --- Netdisco/META.yml | 2 +- Netdisco/lib/App/Netdisco/Web/Search.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Netdisco/META.yml b/Netdisco/META.yml index 18699cb6..f6ccb784 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -61,7 +61,7 @@ requires: Net::Domain: 1.23 Net::LDAP: 0 NetAddr::IP: 4.068 - NetAddr::MAC: 0.9 + NetAddr::MAC: 0.92 Opcode: 1.07 Path::Class: 0.32 Plack: 1.0023 diff --git a/Netdisco/lib/App/Netdisco/Web/Search.pm b/Netdisco/lib/App/Netdisco/Web/Search.pm index 316a88e5..7e329ad8 100644 --- a/Netdisco/lib/App/Netdisco/Web/Search.pm +++ b/Netdisco/lib/App/Netdisco/Web/Search.pm @@ -80,6 +80,7 @@ get '/search' => require_login sub { my $nd = $s->resultset('Device')->search_fuzzy($q); my ($likeval, $likeclause) = sql_match($q); my $mac = NetAddr::MAC->new($q); + undef $mac if (defined $mac and $q =~ m/:{2}[a-f0-9]*$/i); # temp fix if ($nd and $nd->count) { if ($nd->count == 1) {