🍉 Sync 2026-09-25 18:00:12

This commit is contained in:
github-actions[bot] committed 2026-09-25 18:00:12 +08:00
1 parent 7c17dda4d0
commit 2ee65a261e
135 files changed
+5726 -7799

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-only
include $(TOPDIR)/rules.mk
PKG_VERSION:=1.0.7
PKG_RELEASE:=2
PKG_VERSION:=1.0.9
PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0-only AND CC0-1.0 AND MIT AND LicenseRef-Public-Domain AND LicenseRef-fnOS-Trademark
LUCI_MAINTAINER:=coolsnowwolf <coolsnowwolf@gmail.com>
+9 -5
View File
@@ -14,15 +14,19 @@ memory usage; no per-client MAC history is stored. No MAC is sent off-router.
Data comes from [WH-2099/macdb](https://github.com/WH-2099/macdb), which combines
IEEE MA-L, MA-M and MA-S assignments. Longest-prefix matching supports 24/28/36
bits. Multicast, locally administered/randomized and malformed MACs are ignored.
Unknown vendors, absent/random MACs and brands without a bundled icon use a
small generic desktop SVG. It is an original GPL-2.0-only asset, not a brand logo.
bits. Locally administered unicast MACs (first octet ending in 2, 6, A or E)
use a generic phone SVG without an OUI lookup, taking precedence over fnOS
and vendor icons. This is a display rule for private/randomized MACs, not proof
that the device is a phone. Multicast and malformed MACs are not looked up.
Unknown vendors, absent/invalid MACs and brands without a bundled icon use a
small generic desktop SVG. Both generic SVGs are original GPL-2.0-only assets,
not brand logos.
The icon identifies the registered MAC vendor: a PC using an Intel NIC can show
Intel rather than the motherboard manufacturer. DHCP hostnames are not used to
guess brands.
Hosts with an open TCP port 5666 or 5667 in the existing LAN web-probe cache
show the fnOS logo instead of the OUI icon. The probe must be ready and match
show the fnOS logo instead of the OUI icon, except for private MACs. The probe must be ready and match
the current IP and MAC; any active IPv4 address of a merged client can qualify.
This is a port-based display heuristic, not OS authentication. The vector logo
was traced from the supplied `fnos.PNG`; see `NOTICE.fnos`.
@@ -60,7 +64,7 @@ Run the regression checks with `python3 tools/test_generate.py` and
## OEM devices and supplemental brands
Midea and TCL SVGs supplement the Simple Icons subset. Their individual sources,
Midea, TCL and Haier SVGs supplement the Simple Icons subset. Their individual sources,
authors and hashes are recorded in `tools/supplemental.json` and the packaged
`NOTICE.supplemental`. These are not claimed to be Simple Icons assets.
@@ -1,4 +1,4 @@
Midea, TCL and GIGABYTE are supplemental SVGs, not Simple Icons assets.
Midea, TCL, GIGABYTE and Haier are supplemental SVGs, not Simple Icons assets.
Sources and attribution:
{
"midea": {
@@ -18,5 +18,11 @@ Sources and attribution:
"sha256": "49693ef6522f58af4e059afe18c1fb3ddc8e6a5b15ac724d6a7493f47d84d849",
"author": "Koman90",
"license": "Public domain simple shape/text logo; trademark retained"
},
"haier": {
"source": "https://commons.wikimedia.org/wiki/File:Haier_logo.svg",
"sha256": "d71f652fdfb405198761e118e5c4b84fa1de76d9696bb1c13b4980c76ecb6be4",
"author": "Haier",
"license": "Public domain simple shape/text logo; trademark retained"
}
}
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="824px" height="256px" viewBox="0 0 824 256" enable-background="new 0 0 824 256" xml:space="preserve">
<g>
<g>
<path fill="#005BAA" d="M712.652,171.532c0.348-3.178,0.552-6.388,0.552-9.638c0-49.205-40.776-89.07-91.083-89.07
c-50.293,0-91.063,39.865-91.063,89.07c0,49.189,40.771,89.039,91.063,89.039c38.259,0,70.963-23.021,84.481-55.729l-39.257-6.878
c-8.696,15.914-25.151,26.634-43.96,26.634c-24.967,0-45.642-18.778-49.801-43.429H712.652z M623.386,109.79
c21.319,0,39.528,13.729,46.96,33.163h-93.977C583.781,123.52,602.03,109.79,623.386,109.79z"/>
<rect x="460.066" y="76.555" fill="#005BAA" width="46.512" height="171.18"/>
<path fill="#005BAA" d="M483.339,6.758c-14.358,0-25.95,11.655-25.95,25.953c0,14.276,11.592,25.9,25.95,25.9
c14.3,0,25.917-11.624,25.917-25.9C509.256,18.413,497.639,6.758,483.339,6.758"/>
<polygon fill="#005BAA" points="175.389,21.671 175.389,113.822 75.133,113.822 75.133,21.671 24.291,21.671 24.291,247.582
75.133,247.582 75.133,155.427 175.389,155.427 175.389,247.582 226.273,247.582 226.273,21.671 "/>
<path fill="#005BAA" d="M385.318,76.634v9.185c-13.519-8.191-29.361-12.896-46.336-12.896c-49.308,0-89.3,39.84-89.3,89.006
c0,49.156,39.992,89.006,89.3,89.006c16.534,0,31.981-4.491,45.262-12.27v8.918h45.384V76.634H385.318z M341.25,213.408
c-28.777,0-52.04-23.027-52.04-51.459c0-28.456,23.262-51.5,52.04-51.5c28.77,0,52.071,23.044,52.071,51.5
C393.32,190.381,370.019,213.408,341.25,213.408z"/>
<path fill="#005BAA" d="M809.376,60.657c-42.832,7.472-75.396,44.736-75.896,89.679v97.398h44.535l0.023-99.229
c0-22.716,17.053-41.463,39.032-44.153L809.376,60.657z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -7,12 +7,13 @@
var base = document.currentScript.src.replace(/[^/]*$/, '');
var database, pending, devices = Object.create(null);
function normalize(mac) {
function normalize(mac, allowLocal) {
if (typeof mac !== 'string' || !/^(?:[\da-f]{12}|(?:[\da-f]{2}:){5}[\da-f]{2}|(?:[\da-f]{2}-){5}[\da-f]{2})$/i.test(mac))
return null;
mac = mac.replace(/[:-]/g, '').toUpperCase();
// Neither locally administered (randomized) nor multicast addresses have a reliable OUI.
return (parseInt(mac.slice(0, 2), 16) & 3) ? null : mac;
var flags = parseInt(mac.slice(0, 2), 16);
return (flags & 1) || (!allowLocal && (flags & 2)) ? null : mac;
}
function load() {
@@ -20,7 +21,7 @@
// One local request per page; failed requests are cached too, so polling never retries.
pending = new Promise(function(resolve) {
var xhr = new XMLHttpRequest();
xhr.open('GET', base + 'vendors-451e5311befc.json', true);
xhr.open('GET', base + 'vendors-d337209f8c00.json', true);
xhr.timeout = 5000;
xhr.onload = function() {
try {
@@ -74,13 +75,20 @@
}
fallback();
node.insertBefore(icon, node.firstChild);
var unicast = normalize(mac, true);
if (unicast && (parseInt(unicast.slice(0, 2), 16) & 2)) {
icon.title = 'Private MAC';
icon.onerror = fallback;
icon.src = base + 'phone.svg';
return;
}
if (fnos === true) {
icon.title = 'fnOS / FygoOS';
icon.onerror = fallback;
icon.src = base + 'fnos.svg';
return;
}
// Random, malformed or absent addresses use the fallback without an OUI request.
// Malformed or absent addresses use the fallback without an OUI request.
if (!normalize(mac))
return;
function apply() {
@@ -0,0 +1,2 @@
<!-- SPDX-License-Identifier: GPL-2.0-only -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#64748b" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="1.5" width="12" height="21" rx="2.5"/><path d="M10 4h4m-3 15.5h2"/></svg>

After

Width:  |  Height:  |  Size: 291 B

@@ -1 +0,0 @@
{"vendors":[["apple","Apple"],["asus","ASUS"],["acer","Acer"],["msi","MSI"],["dell","Dell"],["hp","HP"],["lenovo","Lenovo"],["samsung","Samsung"],["huawei","Huawei"],["honor","HONOR"],["xiaomi","Xiaomi"],["oppo","OPPO"],["vivo","vivo"],["oneplus","OnePlus"],["motorola","Motorola"],["nokia","Nokia"],["sony","Sony"],["lg","LG"],["google","Google"],["microsoft","Microsoft"],["intel","Intel"],["nvidia","NVIDIA"],["broadcom","Broadcom"],["mediatek","MediaTek"],["fujitsu","Fujitsu"],["toshiba","Toshiba"],["panasonic","Panasonic"],["sharp","Sharp"],["raspberrypi","Raspberry Pi"],["framework","Framework"],["amazon","Amazon"],["tplink","TP-Link"],["ubiquiti","Ubiquiti"],["netgear","NETGEAR"],["linksys","Linksys"],["synology","Synology"],["qnap","QNAP"],["midea","Midea"],["tcl","TCL"],["gigabyte","GIGABYTE"],["vmware","VMware"]],"prefixes":{"00000E":24,"000039":25,"000095":16,"000097":4,"0000E2":2,"0000EB":26,"0000F0":7,"000124":2,"000144":4,"00014A":16,"0001E6":5,"0001E7":5,"000278":7,"0002A5":5,"0002B3":20,"0002EE":15,"000347":20,"000393":0,"0003FF":19,"00040F":1,"00041F":16,"000423":20,"00044B":21,"00047D":14,"0004EA":5,"000502":0,"000569":40,"0005B5":22,"000600":25,"00065B":4,"0007AB":7,"0007E9":20,"000802":5,"00080D":25,"000874":4,"000883":5,"0008C7":5,"000918":7,"00095B":33,"000A00":23,"000A27":0,"000A28":14,"000A57":5,"000A95":0,"000AD9":16,"000AE0":24,"000AEB":31,"000AF7":22,"000B5D":24,"000B97":26,"000BCD":5,"000BDB":4,"000BE1":15,"000C29":40,"000C43":23,"000C6E":1,"000C76":3,"000CE7":23,"000CF1":20,"000D2E":26,"000D3A":19,"000D56":4,"000D57":24,"000D61":39,"000D93":0,"000D9D":5,"000DAE":7,"000DB6":22,"000DE5":7,"000E07":16,"000E0C":20,"000E1F":38,"000E35":20,"000E7B":25,"000E7F":5,"000EA6":1,"000EB3":5,"000EC7":14,"000EED":15,"000F12":26,"000F1F":4,"000F20":5,"000F61":5,"000FB5":33,"000FBB":15,"000FDE":16,"000FEA":39,"001018":22,"00101E":26,"001055":24,"001083":5,"00108C":24,"0010B3":15,"0010DC":3,"0010E3":5,"0010FA":0,"001109":3,"00110A":5,"001111":20,"001124":0,"00112F":1,"001132":35,"001143":4,"001175":20,"001185":5,"00119F":15,"0011D8":1,"00123F":4,"001247":7,"001248":4,"00125A":19,"001262":15,"001267":26,"001279":5,"0012EE":16,"0012F0":20,"0012FB":7,"0012FE":6,"001302":20,"001315":16,"001320":20,"001321":5,"001343":26,"001370":15,"001372":4,"001377":7,"0013A9":16,"0013CE":20,"0013D3":3,"0013D4":1,"0013E8":20,"0013FD":15,"001422":4,"001451":0,"00146C":33,"001478":31,"0014A7":15,"0014C2":5,"001500":20,"001517":20,"00152A":15,"001530":4,"00155D":19,"001560":5,"00156D":32,"001599":7,"0015A0":15,"0015B7":25,"0015B9":7,"0015C1":16,"0015C5":4,"0015DE":15,"0015F2":1,"001617":3,"001620":16,"001632":7,"001635":5,"00164E":15,"00166B":7,"00166C":7,"00166F":20,"001676":20,"0016B8":16,"0016BC":15,"0016CB":0,"0016DB":7,"0016E6":39,"0016EA":20,"0016EB":20,"0016F0":4,"001708":5,"001731":1,"001735":20,"001742":24,"00174B":15,"00175C":27,"0017A4":5,"0017A5":23,"0017B0":15,"0017C9":7,"0017D5":7,"0017F2":0,"0017FA":19,"00180F":15,"001813":16,"001842":15,"00184D":33,"001871":5,"001882":8,"001885":14,"00188B":4,"00188D":15,"0018AF":7,"0018C5":15,"0018DE":20,"0018F3":1,"0018FE":5,"00192D":15,"00194F":15,"001963":16,"001979":15,"001987":26,"00198F":15,"001999":24,"0019B7":15,"0019B9":4,"0019BB":5,"0019C5":16,"0019D1":20,"0019D2":20,"0019DB":3,"0019E0":31,"0019E3":0,"001A11":18,"001A16":15,"001A4B":5,"001A4D":39,"001A75":16,"001A80":16,"001A89":15,"001A8A":7,"001A92":1,"001AA0":4,"001ADC":15,"001B21":20,"001B2F":33,"001B33":15,"001B59":16,"001B63":0,"001B77":20,"001B78":5,"001B98":7,"001BAF":15,"001BD3":26,"001BE9":22,"001BEE":15,"001BFC":1,"001C14":40,"001C23":4,"001C35":15,"001C43":7,"001C50":38,"001C62":17,"001C7E":25,"001C9A":15,"001CA4":16,"001CB3":0,"001CBF":20,"001CC0":20,"001CC4":5,"001CD4":15,"001CD6":15,"001CEE":27,"001D09":4,"001D0D":16,"001D0F":31,"001D25":7,"001D28":16,"001D3B":15,"001D40":20,"001D4F":0,"001D60":1,"001D6E":15,"001D7D":39,"001D92":3,"001D98":15,"001DBA":16,"001DD8":19,"001DE0":20,"001DE1":20,"001DE9":15,"001DF6":7,"001DFD":15,"001E0B":5,"001E10":8,"001E2A":33,"001E3A":15,"001E3B":15,"001E45":16,"001E4F":4,"001E52":0,"001E64":20,"001E65":20,"001E67":20,"001E75":17,"001E7D":7,"001E8C":1,"001EA3":15,"001EA4":15,"001EC2":0,"001EC9":4,"001EDC":16,"001EE1":7,"001EE2":7,"001F00":15,"001F01":15,"001F29":5,"001F33":33,"001F3B":20,"001F3C":20,"001F5B":0,"001F5C":15,"001F5D":15,"001F6B":17,"001F92":14,"001FA7":16,"001FC6":1,"001FCC":7,"001FCD":7,"001FCF":3,"001FD0":39,"001FDE":15,"001FDF":15,"001FE3":17,"001FE4":16,"001FF3":0,"002075":14,"00207B":20,"0020D9":26,"0020ED":39,"002108":15,"002109":15,"002119":7,"002127":31,"00214C":7,"00215A":5,"00215C":20,"00215D":20,"00216A":20,"00216B":20,"002170":4,"002185":3,"00219B":4,"00219E":16,"0021AA":15,"0021AB":15,"0021D1":7,"0021D2":7,"0021E9":0,"0021FB":17,"0021FC":15,"0021FE":15,"002215":1,"002219":4,"00223F":33,"002241":0,"002248":19,"002264":5,"002265":15,"002266":15,"002298":16,"0022A1":8,"0022A6":16,"0022A9":17,"0022DE":11,"0022F3":27,"0022FA":20,"0022FB":20,"0Line truncated
@@ -0,0 +1 @@
{"vendors":[["apple","Apple"],["asus","ASUS"],["acer","Acer"],["msi","MSI"],["dell","Dell"],["hp","HP"],["lenovo","Lenovo"],["samsung","Samsung"],["huawei","Huawei"],["honor","HONOR"],["xiaomi","Xiaomi"],["oppo","OPPO"],["vivo","vivo"],["oneplus","OnePlus"],["motorola","Motorola"],["nokia","Nokia"],["sony","Sony"],["lg","LG"],["google","Google"],["microsoft","Microsoft"],["intel","Intel"],["nvidia","NVIDIA"],["broadcom","Broadcom"],["mediatek","MediaTek"],["fujitsu","Fujitsu"],["toshiba","Toshiba"],["panasonic","Panasonic"],["sharp","Sharp"],["raspberrypi","Raspberry Pi"],["framework","Framework"],["amazon","Amazon"],["tplink","TP-Link"],["ubiquiti","Ubiquiti"],["netgear","NETGEAR"],["linksys","Linksys"],["synology","Synology"],["qnap","QNAP"],["midea","Midea"],["tcl","TCL"],["gigabyte","GIGABYTE"],["vmware","VMware"],["haier","Haier / \u6d77\u5c14"]],"prefixes":{"00000E":24,"000039":25,"000095":16,"000097":4,"0000E2":2,"0000EB":26,"0000F0":7,"000124":2,"000144":4,"00014A":16,"0001E6":5,"0001E7":5,"000278":7,"0002A5":5,"0002B3":20,"0002EE":15,"000347":20,"000393":0,"0003FF":19,"00040F":1,"00041F":16,"000423":20,"00044B":21,"00047D":14,"0004EA":5,"000502":0,"000569":40,"0005B5":22,"000600":25,"00065B":4,"0007A8":41,"0007AB":7,"0007E9":20,"000802":5,"00080D":25,"000874":4,"000883":5,"0008C7":5,"000918":7,"00095B":33,"000A00":23,"000A27":0,"000A28":14,"000A57":5,"000A95":0,"000AD9":16,"000AE0":24,"000AEB":31,"000AF7":22,"000B5D":24,"000B97":26,"000BCD":5,"000BDB":4,"000BE1":15,"000C29":40,"000C43":23,"000C6E":1,"000C76":3,"000CE7":23,"000CF1":20,"000D2E":26,"000D3A":19,"000D56":4,"000D57":24,"000D61":39,"000D93":0,"000D9D":5,"000DAE":7,"000DB6":22,"000DE5":7,"000E07":16,"000E0C":20,"000E1F":38,"000E35":20,"000E7B":25,"000E7F":5,"000EA6":1,"000EB3":5,"000EC7":14,"000EED":15,"000F12":26,"000F1F":4,"000F20":5,"000F61":5,"000FB5":33,"000FBB":15,"000FDE":16,"000FEA":39,"001018":22,"00101E":26,"001055":24,"001083":5,"00108C":24,"0010B3":15,"0010DC":3,"0010E3":5,"0010FA":0,"001109":3,"00110A":5,"001111":20,"001124":0,"00112F":1,"001132":35,"001143":4,"001175":20,"001185":5,"00119F":15,"0011D8":1,"00123F":4,"001247":7,"001248":4,"00125A":19,"001262":15,"001267":26,"001279":5,"0012EE":16,"0012F0":20,"0012FB":7,"0012FE":6,"001302":20,"001315":16,"001320":20,"001321":5,"001343":26,"001370":15,"001372":4,"001377":7,"0013A9":16,"0013CE":20,"0013D3":3,"0013D4":1,"0013E8":20,"0013FD":15,"001422":4,"001451":0,"00146C":33,"001478":31,"0014A7":15,"0014C2":5,"001500":20,"001517":20,"00152A":15,"001530":4,"00155D":19,"001560":5,"00156D":32,"001599":7,"0015A0":15,"0015B7":25,"0015B9":7,"0015C1":16,"0015C5":4,"0015DE":15,"0015F2":1,"001617":3,"001620":16,"001632":7,"001635":5,"00164E":15,"00166B":7,"00166C":7,"00166F":20,"001676":20,"0016B8":16,"0016BC":15,"0016CB":0,"0016DB":7,"0016E6":39,"0016EA":20,"0016EB":20,"0016F0":4,"001708":5,"001731":1,"001735":20,"001742":24,"00174B":15,"00175C":27,"0017A4":5,"0017A5":23,"0017B0":15,"0017C9":7,"0017D5":7,"0017F2":0,"0017FA":19,"00180F":15,"001813":16,"001842":15,"00184D":33,"001871":5,"001882":8,"001885":14,"00188B":4,"00188D":15,"0018AF":7,"0018C5":15,"0018DE":20,"0018F3":1,"0018FE":5,"00192D":15,"00194F":15,"001963":16,"001979":15,"001987":26,"00198F":15,"001999":24,"0019B7":15,"0019B9":4,"0019BB":5,"0019C5":16,"0019D1":20,"0019D2":20,"0019DB":3,"0019E0":31,"0019E3":0,"001A11":18,"001A16":15,"001A4B":5,"001A4D":39,"001A75":16,"001A80":16,"001A89":15,"001A8A":7,"001A92":1,"001AA0":4,"001ADC":15,"001B21":20,"001B2F":33,"001B33":15,"001B59":16,"001B63":0,"001B77":20,"001B78":5,"001B98":7,"001BAF":15,"001BD3":26,"001BE9":22,"001BEE":15,"001BFC":1,"001C14":40,"001C23":4,"001C35":15,"001C43":7,"001C50":38,"001C62":17,"001C7E":25,"001C9A":15,"001CA4":16,"001CB3":0,"001CBF":20,"001CC0":20,"001CC4":5,"001CD4":15,"001CD6":15,"001CEE":27,"001D09":4,"001D0D":16,"001D0F":31,"001D25":7,"001D28":16,"001D3B":15,"001D40":20,"001D4F":0,"001D60":1,"001D6E":15,"001D7D":39,"001D92":3,"001D98":15,"001DBA":16,"001DD8":19,"001DE0":20,"001DE1":20,"001DE9":15,"001DF6":7,"001DFD":15,"001E0B":5,"001E10":8,"001E2A":33,"001E3A":15,"001E3B":15,"001E45":16,"001E4F":4,"001E52":0,"001E64":20,"001E65":20,"001E67":20,"001E75":17,"001E7D":7,"001E8C":1,"001EA3":15,"001EA4":15,"001EC2":0,"001EC9":4,"001EDC":16,"001EE1":7,"001EE2":7,"001F00":15,"001F01":15,"001F29":5,"001F33":33,"001F3B":20,"001F3C":20,"001F5B":0,"001F5C":15,"001F5D":15,"001F6B":17,"001F92":14,"001FA7":16,"001FC6":1,"001FCC":7,"001FCD":7,"001FCF":3,"001FD0":39,"001FDE":15,"001FDF":15,"001FE3":17,"001FE4":16,"001FF3":0,"002075":14,"00207B":20,"0020D9":26,"0020ED":39,"002108":15,"002109":15,"002119":7,"002127":31,"00214C":7,"00215A":5,"00215C":20,"00215D":20,"00216A":20,"00216B":20,"002170":4,"002185":3,"00219B":4,"00219E":16,"0021AA":15,"0021AB":15,"0021D1":7,"0021D2":7,"0021E9":0,"0021FB":17,"0021FC":15,"0021FE":15,"002215":1,"002219":4,"00223F":33,"002241":0,"002248":19,"002264":5,"002265":15,"002266":15,"002298":16,"0022A1":8,"0022A6":16,"0022A9":17,"0022Line truncated
+21 -3
View File
@@ -2,10 +2,10 @@
"simple_icons": "https://github.com/simple-icons/simple-icons/tree/11.15.0",
"macdb": {
"url": "https://github.com/WH-2099/macdb",
"sha256": "dab68f6728825b5e6e894e537ffbc82d2d387eb2ba3d8dd313962dcef8076979"
"sha256": "98c197dd8a59c30b89866de97c1e8833fcb4456c753693c447f7403c5d753eb0"
},
"database": "vendors-451e5311befc.json",
"assignments": 8637,
"database": "vendors-d337209f8c00.json",
"assignments": 8712,
"supplemental_icons": {
"midea": {
"source": "https://commons.wikimedia.org/wiki/File:Midea.svg",
@@ -24,6 +24,12 @@
"sha256": "49693ef6522f58af4e059afe18c1fb3ddc8e6a5b15ac724d6a7493f47d84d849",
"author": "Koman90",
"license": "Public domain simple shape/text logo; trademark retained"
},
"haier": {
"source": "https://commons.wikimedia.org/wiki/File:Haier_logo.svg",
"sha256": "d71f652fdfb405198761e118e5c4b84fa1de76d9696bb1c13b4980c76ecb6be4",
"author": "Haier",
"license": "Public domain simple shape/text logo; trademark retained"
}
},
"aliases": {
@@ -88,6 +94,18 @@
"google": [
"Google, Inc."
],
"haier": [
"Beijing Haier IC Design Co.,Ltd",
"Haier",
"Haier Group Technologies Ltd",
"Haier cloud Health Technology (Qingdao) Co., Ltd",
"QING DAO HAIER TELECOM CO.,LTD.",
"Qingdao Haier Intelligent Home Appliance Technology Co.,Ltd",
"Qingdao Haier Multimedia Limited. ",
"Qingdao Haier Technology Co.,Ltd",
"Qingdao Haier Technology Co.Ltd",
"Qingdao HaierTechnology Co.,Ltd"
],
"honor": [
"Honor Device Co., Ltd."
],
+6
View File
@@ -16,5 +16,11 @@
"sha256": "49693ef6522f58af4e059afe18c1fb3ddc8e6a5b15ac724d6a7493f47d84d849",
"author": "Koman90",
"license": "Public domain simple shape/text logo; trademark retained"
},
"haier": {
"source": "https://commons.wikimedia.org/wiki/File:Haier_logo.svg",
"sha256": "d71f652fdfb405198761e118e5c4b84fa1de76d9696bb1c13b4980c76ecb6be4",
"author": "Haier",
"license": "Public domain simple shape/text logo; trademark retained"
}
}
+11
View File
@@ -30,6 +30,17 @@ class Aliases(unittest.TestCase):
self.assertEqual(self.brand('TCL King Electrical Appliances(Huizhou)Co.,Ltd'), 'tcl')
self.assertEqual(self.brand('Hui Zhou Gaoshengda Technology Co.,LTD'), 'tcl')
def test_haier(self):
for name in ['Qingdao Haier Technology Co.,Ltd',
'Qingdao HaierTechnology Co.,Ltd',
'QING DAO HAIER TELECOM CO.,LTD.', 'Haier']:
self.assertEqual(self.brand(name), 'haier')
self.assertIsNone(self.brand('Unrelated Haier Module Supplier'))
data = json.loads(next((ROOT / 'htdocs/luci-static/resources/oui').glob('vendors-*.json')).read_text())
mac = '34:29:EF:89:41:3C'.replace(':', '')
self.assertEqual(data['vendors'][data['prefixes'][mac[:6]]][0], 'haier')
self.assertEqual(data['vendors'][data['prefixes']['0439CB']][0], 'haier')
def test_vmware(self):
self.assertEqual(self.brand('VMware, Inc.'), 'vmware')
self.assertIsNone(self.brand('VMware Unrelated Devices'))
+14 -2
View File
@@ -26,6 +26,18 @@ function setup(fail = false) {
for (const mac of [null, '', '02:11:22:00:00:00', '01:11:22:00:00:00', 'FF:FF:FF:FF:FF:FF', '001122', '00:11-22:33:44:55'])
t.oui.decorate(t.node(), mac);
assert.equal(t.requests(), 0, 'invalid or private MACs must not fetch data');
for (let octet = 0; octet < 256; octet++) {
const mac = octet.toString(16).padStart(2, '0') + ':11:22:33:44:55';
if (!(octet & 3)) continue;
const n = t.node(); t.oui.decorate(n, mac);
assert(n.children[0].src.endsWith((octet & 3) === 2 ? '/phone.svg' : '/computer.svg'));
}
for (const mac of ['a6-11-22-33-44-55', 'AE1122334455', 'BA:71:BE:00:00:01']) {
const n = t.node(); t.oui.decorate(n, mac, true);
assert(n.children[0].src.endsWith('/phone.svg'), 'private MAC must take precedence over fnOS');
n.children[0].onerror(); assert(n.children[0].src.endsWith('/computer.svg'));
}
assert.equal(t.requests(), 0, 'phone icons must not fetch the OUI database');
const cases = [['00:11:22:00:00:00','ASUS'],['00-11-22-35-00-00','Apple'],['001122334455','ASUS'],['00:11:22:40:00:00',null],['00:AB:CD:00:00:00',null]];
const nodes = cases.map(([mac]) => { const n=t.node(); t.oui.decorate(n,mac); return n; });
await Promise.resolve(); await Promise.resolve();
@@ -42,7 +54,7 @@ function setup(fail = false) {
assert.equal(other.children[0].title,'Unknown vendor','OEM overrides must not affect other devices in the same OUI');
assert.equal(unsafe.children[0].title,'Unknown vendor');
const fnos=t.node();
t.oui.decorate(fnos,'BA:71:BE:00:00:01',true);
t.oui.decorate(fnos,'B8:71:BE:00:00:01',true);
assert.equal(fnos.children[0].title,'fnOS / FygoOS');
assert(fnos.children[0].src.endsWith('/fnos.svg'));
const overridden=t.node();
@@ -71,7 +83,7 @@ function setup(fail = false) {
enabled = true;
const host = view.renderHostname('<img src=x>', '00:11:22:00:00:00');
assert.equal(host.children[0].text, '<img src=x>');
assert.equal(scripts[0].src, '/luci-static/resources/oui/oui.js?v=8');
assert.equal(scripts[0].src, '/luci-static/resources/oui/oui.js?v=10');
view.renderHostname('host2', '00:11:22:00:00:01');
assert.equal(scripts.length, 1);
console.log('OUI runtime and optional integration checks passed');
+8
View File
@@ -295,5 +295,13 @@
"patterns": [
"^vmware(?: inc)?$"
]
},
{
"slug": "haier",
"name": "Haier / \u6d77\u5c14",
"patterns": [
"^(?:(?:qing ?dao|beijing) )?haier(?: |technology|$)"
],
"supplemental": true
}
]