Skip to content

Commit a0f1c6f

Browse files
committed
tests: add comment on generated MAC addresses
Document that the 06:00 MAC prefix is just a locally defined one so it should not conflict with other devices. Also the choice seems arbitrary. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent d03d45f commit a0f1c6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/host_tools/network.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def mac_from_ip(ip_address):
130130
"""Create a MAC address based on the provided IP.
131131
132132
Algorithm:
133-
- the first 2 bytes are fixed to 06:00
133+
- the first 2 bytes are fixed to 06:00, which is in an LAA range
134+
- https://en.wikipedia.org/wiki/MAC_address#Ranges_of_group_and_locally_administered_addresses
134135
- the next 4 bytes are the IP address
135136
136137
Example of function call:

0 commit comments

Comments
 (0)