#748 always call NetAddr::MAC->new() with named mac param
This commit is contained in:
1
Changes
1
Changes
@@ -3,6 +3,7 @@
|
|||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
* #747 handle missing snmpEngineID
|
* #747 handle missing snmpEngineID
|
||||||
|
* #748 always call NetAddr::MAC->new() with named mac param
|
||||||
|
|
||||||
2.046002 - 2020-08-07
|
2.046002 - 2020-08-07
|
||||||
|
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ sub search_by_field {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# get IEEE MAC format
|
# get IEEE MAC format
|
||||||
my $mac = NetAddr::MAC->new($p->{mac});
|
my $mac = NetAddr::MAC->new(mac => $p->{mac});
|
||||||
undef $mac if
|
undef $mac if
|
||||||
($mac and $mac->as_ieee
|
($mac and $mac->as_ieee
|
||||||
and (($mac->as_ieee eq '00:00:00:00:00:00')
|
and (($mac->as_ieee eq '00:00:00:00:00:00')
|
||||||
@@ -401,7 +401,7 @@ sub search_fuzzy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# get IEEE MAC format
|
# get IEEE MAC format
|
||||||
my $mac = NetAddr::MAC->new($q);
|
my $mac = NetAddr::MAC->new(mac => $q);
|
||||||
undef $mac if
|
undef $mac if
|
||||||
($mac and $mac->as_ieee
|
($mac and $mac->as_ieee
|
||||||
and (($mac->as_ieee eq '00:00:00:00:00:00')
|
and (($mac->as_ieee eq '00:00:00:00:00:00')
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ sub store_arp {
|
|||||||
my ($hash_ref, $now) = @_;
|
my ($hash_ref, $now) = @_;
|
||||||
$now ||= 'now()';
|
$now ||= 'now()';
|
||||||
my $ip = $hash_ref->{'ip'};
|
my $ip = $hash_ref->{'ip'};
|
||||||
my $mac = NetAddr::MAC->new($hash_ref->{'node'});
|
my $mac = NetAddr::MAC->new(mac => $hash_ref->{'node'});
|
||||||
my $name = $hash_ref->{'dns'};
|
my $name = $hash_ref->{'dns'};
|
||||||
|
|
||||||
return if !defined $mac or $mac->errstr;
|
return if !defined $mac or $mac->errstr;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ get '/ajax/content/search/port' => require_login sub {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my ( $likeval, $likeclause ) = sql_match($q);
|
my ( $likeval, $likeclause ) = sql_match($q);
|
||||||
my $mac = NetAddr::MAC->new($q);
|
my $mac = NetAddr::MAC->new(mac => $q);
|
||||||
|
|
||||||
undef $mac if
|
undef $mac if
|
||||||
($mac and $mac->as_ieee
|
($mac and $mac->as_ieee
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ get '/search' => require_login sub {
|
|||||||
else {
|
else {
|
||||||
my $nd = $s->resultset('Device')->search_fuzzy($q);
|
my $nd = $s->resultset('Device')->search_fuzzy($q);
|
||||||
my ($likeval, $likeclause) = sql_match($q);
|
my ($likeval, $likeclause) = sql_match($q);
|
||||||
my $mac = NetAddr::MAC->new($q);
|
my $mac = NetAddr::MAC->new(mac => $q);
|
||||||
|
|
||||||
undef $mac if
|
undef $mac if
|
||||||
($mac and $mac->as_ieee
|
($mac and $mac->as_ieee
|
||||||
|
|||||||
Reference in New Issue
Block a user