ea[4] = x >> 8;
ea[5] = x;
}
-static inline void eth_addr_random(uint8_t ea[ETH_ADDR_LEN])
+static inline void eth_addr_mark_random(uint8_t ea[ETH_ADDR_LEN])
{
- random_bytes(ea, ETH_ADDR_LEN);
ea[0] &= ~1; /* Unicast. */
ea[0] |= 2; /* Private. */
}
+static inline void eth_addr_random(uint8_t ea[ETH_ADDR_LEN])
+{
+ random_bytes(ea, ETH_ADDR_LEN);
+ eth_addr_mark_random(ea);
+}
/* Returns true if 'ea' is a reserved multicast address, that a bridge must
* never forward, false otherwise. */
static inline bool eth_addr_is_reserved(const uint8_t ea[ETH_ADDR_LEN])