diff options
author | Christian Hesse <mail@eworm.de> | 2022-09-20 09:17:57 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-09-20 09:30:33 +0200 |
commit | 84b5e77860e2705c257273395cf21ea4e3da5ccf (patch) | |
tree | fa05ede3ba1da013543c62f668e5363651150595 | |
parent | c33e813f20839cb3bc0f56003ca5336229bfa430 (diff) |
global-functions: $GetMacVendor: detect locally administered addresses
https://en.wikipedia.org/wiki/MAC_address#Universal_vs._local_(U/L_bit)
-rw-r--r-- | global-functions | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/global-functions b/global-functions index 7c8bfdc..3f7a65e 100644 --- a/global-functions +++ b/global-functions @@ -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; |