From 84b5e77860e2705c257273395cf21ea4e3da5ccf Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 20 Sep 2022 09:17:57 +0200 Subject: global-functions: $GetMacVendor: detect locally administered addresses https://en.wikipedia.org/wiki/MAC_address#Universal_vs._local_(U/L_bit) --- global-functions | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3-70-g09d2