projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Random Ethernet addresses should be private and should not be multicast.
[openvswitch]
/
include
/
packets.h
diff --git
a/include/packets.h
b/include/packets.h
index e7681ad436a864329a7966ea015bfe812127b3e1..bad36712d3fb96af550e156a65bfd2c3d7cd99b6 100644
(file)
--- a/
include/packets.h
+++ b/
include/packets.h
@@
-86,6
+86,8
@@
static inline void eth_addr_from_uint64(uint64_t x, uint8_t ea[ETH_ADDR_LEN])
static inline void eth_addr_random(uint8_t ea[ETH_ADDR_LEN])
{
random_bytes(ea, ETH_ADDR_LEN);
+ ea[0] &= ~1; /* Unicast. */
+ ea[0] |= 2; /* Private. */
}
#define ETH_ADDR_FMT \