Minor clean up
This commit is contained in:
parent
2e6630eff9
commit
94160aa5a7
|
@ -57,7 +57,7 @@ get '/ula6' => sub {
|
|||
my ($mac, $ula6);
|
||||
|
||||
# Check the MAC
|
||||
$mac = ($c->param('macaddr')) ? lc $c->param('macaddr') : '';
|
||||
$mac = $c->param('macaddr') ? lc $c->param('macaddr') : '';
|
||||
if ($mac =~ /$RE{net}{MAC}/) {
|
||||
# Local vars for this bit
|
||||
my (
|
||||
|
@ -75,8 +75,7 @@ get '/ula6' => sub {
|
|||
|
||||
# EUI64
|
||||
@fields = split(/:/, $mac);
|
||||
$halfone = $fields[0] . $fields[1] . $fields[2] . "ff";
|
||||
$halftwo = "fe" . $fields[3] . $fields[4] . $fields[5];
|
||||
$halftwo = "fe" . $fields[3] . $fields[4] . $fields[5];
|
||||
$binfield = sprintf "%b", hex $fields[0];
|
||||
$decfield = sprintf "%d", hex $fields[0];
|
||||
$decfield = ($binfield =~ /1[01]$/) ? $decfield - 2 : $decfield + 2;
|
||||
|
|
Loading…
Reference in a new issue