Search by device port MAC no longer fatal
This commit is contained in:
@@ -12,6 +12,10 @@
|
|||||||
* Use Path::Class for path and file name construction consistently
|
* Use Path::Class for path and file name construction consistently
|
||||||
* Avoid use of DNS when looking up devices in DB by IP
|
* Avoid use of DNS when looking up devices in DB by IP
|
||||||
|
|
||||||
|
[BIG FIXES]
|
||||||
|
|
||||||
|
* Search by device port MAC no longer fatal
|
||||||
|
|
||||||
2.005000_002 - 2013-02-10
|
2.005000_002 - 2013-02-10
|
||||||
|
|
||||||
[ENHANCEMENTS]
|
[ENHANCEMENTS]
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ sub search_aliases {
|
|||||||
|
|
||||||
my $clause;
|
my $clause;
|
||||||
if ($by_ip) {
|
if ($by_ip) {
|
||||||
my $ip = NetAddr::IP::Lite->new($q);
|
my $ip = NetAddr::IP::Lite->new($q)
|
||||||
|
or return undef; # could be a MAC address!
|
||||||
$clause = [
|
$clause = [
|
||||||
'me.ip' => { '<<=' => $ip->cidr },
|
'me.ip' => { '<<=' => $ip->cidr },
|
||||||
'device_ips.alias' => { '<<=' => $ip->cidr },
|
'device_ips.alias' => { '<<=' => $ip->cidr },
|
||||||
|
|||||||
Reference in New Issue
Block a user