From b89988cd697da95b767a21b9ac89fa4a9f487d8a Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 3 Sep 2014 10:39:05 +0000 Subject: [PATCH] Skip device aliases which cannot be parsed as IPs --- Netdisco/Changes | 11 ++++++++++- Netdisco/lib/App/Netdisco/Core/Discover.pm | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 16da4037..a553040a 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,3 +1,13 @@ +2.029007 + + [ENHANCEMENTS] + + * [#123] Allow devices with no LLDP/CDP to be found as Nodes + + [BUG FIXES] + + * Skip device aliases which cannot be parsed as IPs + 2.029006 - 2014-08-25 [NEW FEATURES] @@ -8,7 +18,6 @@ [ENHANCEMENTS] * Port search also searches on the Remote ID and Type - * [#123] Allow devices with no LLDP/CDP to be found as Nodes 2.029005 - 2014-08-13 diff --git a/Netdisco/lib/App/Netdisco/Core/Discover.pm b/Netdisco/lib/App/Netdisco/Core/Discover.pm index f4def41d..29acbac6 100644 --- a/Netdisco/lib/App/Netdisco/Core/Discover.pm +++ b/Netdisco/lib/App/Netdisco/Core/Discover.pm @@ -120,7 +120,8 @@ sub store_device { # build device aliases suitable for DBIC my @aliases; foreach my $entry (keys %$ip_index) { - my $ip = NetAddr::IP::Lite->new($entry); + my $ip = NetAddr::IP::Lite->new($entry) + or next; my $addr = $ip->addr; next if $addr eq '0.0.0.0';