compare ieee mac against 6 iterations (#611)

This commit is contained in:
nick n
2019-08-03 00:07:56 +02:00
committed by Oliver Gorwits
parent 4630879a1d
commit e37a834749
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ ajax '/ajax/content/search/node' => require_login sub {
my $mac = NetAddr::MAC->new(mac => $node); my $mac = NetAddr::MAC->new(mac => $node);
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') and (($mac->as_ieee eq '00:00:00:00:00:00')
or ($mac->as_ieee !~ m/$RE{net}{MAC}/))); or ($mac->as_ieee !~ m/$RE{net}{MAC}/)));
my @active = (param('archived') ? () : (-bool => 'active')); my @active = (param('archived') ? () : (-bool => 'active'));

View File

@@ -43,7 +43,7 @@ get '/search' => require_login sub {
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') and (($mac->as_ieee eq '00:00:00:00:00:00')
or ($mac->as_ieee !~ m/$RE{net}{MAC}/))); or ($mac->as_ieee !~ m/$RE{net}{MAC}/)));
if ($nd and $nd->count) { if ($nd and $nd->count) {