Skip to contentSkip to conversation

tools/libxl: Document where the magic MAC numbers come from

PATCH In review Andrew Cooper 2 participants 2 messages Feb 10, 2021 – Feb 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/libxl: Document where the magic MAC numbers come from

Matches the comment in the xl-network-configuration manpage.

---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
CC: Anthony PERARD <[email protected]>

---
 tools/libs/light/libxl_nic.c | 1 +
 1 file changed, 1 insertion(+)
tools/libs/light/libxl_nic.c +1 -0
index 144e9e23e1..0b45469dca 100644
@@ -73,6 +73,7 @@ static int libxl__device_nic_setdefault(libxl__gc *gc, uint32_t domid,
         libxl_uuid_generate(&uuid);
         r = libxl_uuid_bytearray(&uuid);
 
+        /* Generate a random MAC address, with Xen's OUI (00:16:3e) */
         nic->mac[0] = 0x00;
         nic->mac[1] = 0x16;
         nic->mac[2] = 0x3e;
Signature · 1 line
2.11.0