mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
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:
@@ -388,6 +388,10 @@
|
|||||||
:global CertificateAvailable;
|
:global CertificateAvailable;
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
|
|
||||||
|
:if ([ :tonum ("0x" . [ :pick $Mac 0 [ :find $Mac ":" ] ]) ] & 2 = 2) do={
|
||||||
|
:return "locally administered";
|
||||||
|
}
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
:if ([ $CertificateAvailable "R3" ] = false) do={
|
:if ([ $CertificateAvailable "R3" ] = false) do={
|
||||||
$LogPrintExit2 warning $0 ("Downloading required certificate failed.") true;
|
$LogPrintExit2 warning $0 ("Downloading required certificate failed.") true;
|
||||||
|
Reference in New Issue
Block a user