File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,14 @@ import (
13
13
14
14
func MACAddress (uniqueID string ) string {
15
15
sha := sha256 .Sum256 ([]byte (osutil .MachineID () + uniqueID ))
16
- // According to https://gitlab.com/wireshark/wireshark/-/blob/master/manuf
17
- // no well-known MAC addresses start with 0x22.
18
- hw := append (net.HardwareAddr {0x22 }, sha [0 :5 ]... )
16
+ // "5" is the magic number in the Lima ecosystem.
17
+ // (Visit https://en.wiktionary.org/wiki/lima and Command-F "five")
18
+ //
19
+ // But the second hex number is changed to 2 to satisfy the convention for
20
+ // local MAC addresses (https://en.wikipedia.org/wiki/MAC_address#Ranges_of_group_and_locally_administered_addresses)
21
+ //
22
+ // See also https://gitlab.com/wireshark/wireshark/-/blob/master/manuf to confirm the uniqueness of this prefix.
23
+ hw := append (net.HardwareAddr {0x52 , 0x55 , 0x55 }, sha [0 :3 ]... )
19
24
return hw .String ()
20
25
}
21
26
You can’t perform that action at this time.
0 commit comments