global-functions: $GetMacVendor: detect locally administered addresses

https://en.wikipedia.org/wiki/MAC_address#Universal_vs._local_(U/L_bit)
This commit is contained in:
Christian Hesse 2022-09-20 09:17:57 +02:00
parent c33e813f20
commit 84b5e77860

View file

@ -388,6 +388,10 @@
:global CertificateAvailable;
:global LogPrintExit2;
:if ([ :tonum ("0x" . [ :pick $Mac 0 [ :find $Mac ":" ] ]) ] & 2 = 2) do={
:return "locally administered";
}
:do {
:if ([ $CertificateAvailable "R3" ] = false) do={
$LogPrintExit2 warning $0 ("Downloading required certificate failed.") true;