diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-11-29 04:11:48 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-11-29 04:11:48 +0000 |
commit | d6d2a9ccc99fadfb5a0fd6b1c9052bf6c2bcdb54 (patch) | |
tree | 09f7e4f84ebf5d28e6634acd4f0a47396723dc4e /make-manuf | |
parent | f69e977a76d09d3b613d010a2c2805061e4bdf84 (diff) | |
download | wireshark-d6d2a9ccc99fadfb5a0fd6b1c9052bf6c2bcdb54.tar.gz wireshark-d6d2a9ccc99fadfb5a0fd6b1c9052bf6c2bcdb54.tar.bz2 wireshark-d6d2a9ccc99fadfb5a0fd6b1c9052bf6c2bcdb54.zip |
Translate the A-F characters of all OUIs to uppercase before inserting
them into the hash. Without using the same case on all OUIs, some collisions
were not detected (00:00:F6 vs 00:00:f6)
svn path=/trunk/; revision=2707
Diffstat (limited to 'make-manuf')
-rwxr-xr-x | make-manuf | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/make-manuf b/make-manuf index e15cb672f8..d97147b8e1 100755 --- a/make-manuf +++ b/make-manuf @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: make-manuf,v 1.1 2000/11/23 18:22:00 gerald Exp $ +# $Id: make-manuf,v 1.2 2000/11/29 04:11:48 gram Exp $ # # Make-manuf - Creates a file containing ethernet OUIs and their # company IDs. It merges the databases at @@ -68,6 +68,8 @@ while ($line = <TMPL>) { print(OUT "$line\n"); } elsif (($oui, $manuf) = ($line =~ /^($oui_re)\s+(\S.*)$/)) { $inheader = 0; + # Ensure OUI is all upper-case + $oui =~ tr/a-f/A-F/; $oui_list{$oui} = $manuf; $tmpl_added++; } @@ -77,6 +79,8 @@ foreach $line (split(/\n/, $cb_list)) { if (($oui, $manuf) = ($line =~ /^($cb_re)\s+(\S.*)$/)) { ($h1, $h2, $h3) = ($oui =~ /($hp)($hp)($hp)/); # The CaveBear bytes have no separators $oui = "$h1:$h2:$h3"; + # Ensure OUI is all upper-case + $oui =~ tr/a-f/A-F/; if (exists $oui_list{$oui}) { printf "$oui - Skipping CaveBear \"$manuf\" in favor of \"$oui_list{$oui}\"\n"; $cb_skipped++; @@ -90,6 +94,8 @@ foreach $line (split(/\n/, $cb_list)) { foreach $line (split(/\n/, $ieee_list)) { if (($oui, $manuf) = ($line =~ /^($ieee_re)\s+\(hex\)\s+(\S.*)$/)) { $oui =~ tr /-/:/; # The IEEE bytes are separated by dashes. + # Ensure OUI is all upper-case + $oui =~ tr/a-f/A-F/; if (exists $oui_list{$oui}) { printf "$oui - Skipping IEEE \"$manuf\" in favor of \"$oui_list{$oui}\"\n"; $ieee_skipped++; |