Fix for node search on some formats of IPv6 addr being seen as MAC

This commit is contained in:
Oliver Gorwits
2014-12-24 18:45:52 +00:00
parent cceae236d1
commit f366576027
2 changed files with 5 additions and 0 deletions

View File

@@ -6,6 +6,10 @@
* Add BSD install notes
* Update IP Inventory to show MAC address and have working Last Used sort
[BUG FIXES]
* Fix for node search on some formats of IPv6 addr being seen as MAC
2.029014 - 2014-11-19
[ENHANCEMENTS]

View File

@@ -23,6 +23,7 @@ ajax '/ajax/content/search/node' => require_login sub {
my ( $start, $end ) = param('daterange') =~ m/(\d+-\d+-\d+)/gmx;
my $mac = NetAddr::MAC->new(mac => $node);
undef $mac if (defined $mac and $node =~ m/:{2}[a-f0-9]*$/i); # temp fix
my @active = (param('archived') ? () : (-bool => 'active'));
my @times = ();