Handle whitespace ahead of OUI data

This commit is contained in:
Oliver Gorwits
2013-05-05 16:20:39 +01:00
parent 5c8a5754f6
commit f468b48049
2 changed files with 4 additions and 3 deletions

View File

@@ -134,7 +134,7 @@ sub deploy_oui {
if ($resp->{success}) {
foreach my $line (split /\n/, $resp->{content}) {
if ($line =~ m/^(.{2}-.{2}-.{2})\s+\(hex\)\s+(.*)\s*$/i) {
if ($line =~ m/^\s*(.{2}-.{2}-.{2})\s+\(hex\)\s+(.*)\s*$/i) {
my ($oui, $company) = ($1, $2);
$oui =~ s/-/:/g;
$data{lc($oui)} = $company;