mirror of
https://github.com/systemd/systemd.git
synced 2025-01-21 22:04:01 +03:00
hwdb: add IAB to the OUI database
The individual address block is a poor man's organizationally unique identifier. Perhaps we should change the udev key from ID_OUI_FROM_DATABASE to something like ID_IEEE_VENDOR_FROM_DATABASE? Suggested-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
This commit is contained in:
parent
d9847b3246
commit
5fe25affc0
@ -4145,7 +4145,8 @@ distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
|
||||
|
||||
clean-local:
|
||||
rm -rf $(abs_srcdir)/install-tree
|
||||
rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt
|
||||
rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
|
||||
$(abs_srcdir)/hwdb/iab.txt
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
|
||||
@ -4173,6 +4174,7 @@ hwdb-update:
|
||||
wget -N http://www.linux-usb.org/usb.ids && \
|
||||
wget -N http://pci-ids.ucw.cz/v2.2/pci.ids && \
|
||||
wget -N http://standards.ieee.org/develop/regauth/oui/oui.txt && \
|
||||
wget -N http://standards.ieee.org/develop/regauth/iab/iab.txt && \
|
||||
./ids-update.pl )
|
||||
|
||||
upload: all distcheck
|
||||
|
1
hwdb/.gitignore
vendored
1
hwdb/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/pci.ids
|
||||
/usb.ids
|
||||
/oui.txt
|
||||
/iab.txt
|
||||
|
113412
hwdb/20-OUI.hwdb
113412
hwdb/20-OUI.hwdb
File diff suppressed because it is too large
Load Diff
@ -1037,12 +1037,48 @@ pci:v00001000d0000005Bsv00001000sd00009265*
|
||||
pci:v00001000d0000005Bsv00001000sd00009266*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9266-8i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009267*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9267-8i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009268*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9265CV-8i / 9270CV-8i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009269*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9266-4i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009270*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9270-8i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009271*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9271-8i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009272*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9272-8i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009273*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9270CV-8i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009274*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9270-4i
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009275*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9271-8iCC
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009285*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9285-8e
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009288*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9285CV-8e
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009290*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9286-8e
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009291*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9286CV-8e
|
||||
|
||||
pci:v00001000d0000005Bsv00001000sd00009295*
|
||||
ID_PRODUCT_FROM_DATABASE=MegaRAID SAS 9286CV-8eCC
|
||||
|
||||
pci:v00001000d0000005Bsv00001014sd0000040B*
|
||||
ID_PRODUCT_FROM_DATABASE=ServeRAID M5110 SAS/SATA Controller
|
||||
|
||||
@ -9890,6 +9926,9 @@ pci:v00001039d00007007sv00001462sd0000701D*
|
||||
pci:v00001039d00007012*
|
||||
ID_PRODUCT_FROM_DATABASE=SiS7012 AC'97 Sound Controller
|
||||
|
||||
pci:v00001039d00007012sv00001019sd00000F05*
|
||||
ID_PRODUCT_FROM_DATABASE=A928 (i-Buddie)
|
||||
|
||||
pci:v00001039d00007012sv00001039sd00007012*
|
||||
ID_PRODUCT_FROM_DATABASE=SiS 7012 onboard [Asus P4SC-EA] AC'97 Sound Controller
|
||||
|
||||
@ -47681,6 +47720,12 @@ pci:v00008086d00000151sv00001043sd00001477*
|
||||
pci:v00008086d00000152*
|
||||
ID_PRODUCT_FROM_DATABASE=Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller
|
||||
|
||||
pci:v00008086d00000153*
|
||||
ID_PRODUCT_FROM_DATABASE=3rd Gen Core Processor Thermal Subsystem
|
||||
|
||||
pci:v00008086d00000153sv00001043sd00001517*
|
||||
ID_PRODUCT_FROM_DATABASE=Zenbook Prime UX31A
|
||||
|
||||
pci:v00008086d00000154*
|
||||
ID_PRODUCT_FROM_DATABASE=3rd Gen Core processor DRAM Controller
|
||||
|
||||
|
@ -208,24 +208,53 @@ sub pci_classes {
|
||||
}
|
||||
|
||||
sub oui {
|
||||
open(IN, "<", "oui.txt");
|
||||
my $iab_prefix;
|
||||
my %iab_prefixes = ();
|
||||
|
||||
open(OUT, ">", "20-OUI.hwdb");
|
||||
print(OUT "# This file is part of systemd.\n" .
|
||||
"#\n" .
|
||||
"# Data imported and updated from: http://standards.ieee.org/develop/regauth/iab/iab.txt\n" .
|
||||
"# Data imported and updated from: http://standards.ieee.org/develop/regauth/oui/oui.txt\n");
|
||||
|
||||
open(IN, "<", "iab.txt");
|
||||
while (my $line = <IN>) {
|
||||
$line =~ s/\s+$//;
|
||||
$line =~ m/^([0-9A-F]{2})-([0-9A-F]{2})-([0-9A-F]{2})\s*\(hex\)\s*.+$/;
|
||||
if (defined $1) {
|
||||
$iab_prefix = $1 . $2 . $3;
|
||||
$iab_prefixes{ $iab_prefix } = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
$line =~ m/^([0-9A-F]{3})000-\g1FFF\s*\(base 16\)\s*(.+)$/;
|
||||
if (defined $1) {
|
||||
my $vendor = uc $1;
|
||||
my $text = $2;
|
||||
|
||||
print(OUT "\n");
|
||||
print(OUT "OUI:" . $iab_prefix . $vendor . "*\n");
|
||||
print(OUT " ID_OUI_FROM_DATABASE=" . $text . "\n");
|
||||
}
|
||||
}
|
||||
close(INP);
|
||||
|
||||
open(IN, "<", "oui.txt");
|
||||
while (my $line = <IN>) {
|
||||
$line =~ s/\s+$//;
|
||||
$line =~ m/^([0-9A-F]{6})\s*\(base 16\)\s*(.+)$/;
|
||||
if (defined $1) {
|
||||
my $vendor = uc $1;
|
||||
my $text = $2;
|
||||
print(OUT "\n");
|
||||
print(OUT "OUI:" . $vendor . "\n");
|
||||
print(OUT " ID_OUI_FROM_DATABASE=" . $text . "\n");
|
||||
|
||||
# skip the IAB prefixes
|
||||
if (! exists $iab_prefixes{ $vendor }) {
|
||||
print(OUT "\n");
|
||||
print(OUT "OUI:" . $vendor . "*\n");
|
||||
print(OUT " ID_OUI_FROM_DATABASE=" . $text . "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close(INP);
|
||||
close(OUTP);
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ static int dev_mac(struct udev_device *dev, const char *prefix, bool test) {
|
||||
* skip commonly misused 00:00:00 (Xerox) prefix
|
||||
*/
|
||||
if (a1 + a2 + a3 > 0) {
|
||||
snprintf(str, sizeof(str), "OUI:%02X%02X%02X", a1, a2, a3);
|
||||
snprintf(str, sizeof(str), "OUI:%02X%02X%02X%02X%02X%02X", a1, a2, a3, a4, a5, a6);
|
||||
udev_builtin_hwdb_lookup(dev, str, test);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user