Skip to content

Commit

Permalink
tests: add comment on generated MAC addresses
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pb8o committed Oct 21, 2024
1 parent d03d45f commit a0f1c6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/host_tools/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def mac_from_ip(ip_address):
"""Create a MAC address based on the provided IP.
Algorithm:
- the first 2 bytes are fixed to 06:00
- the first 2 bytes are fixed to 06:00, which is in an LAA range
- https://en.wikipedia.org/wiki/MAC_address#Ranges_of_group_and_locally_administered_addresses
- the next 4 bytes are the IP address
Example of function call:
Expand Down

0 comments on commit a0f1c6f

Please sign in to comment.