diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-12-18 14:47:47 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-12-19 03:48:05 +0100 |
commit | e22ca70008999ec451f2cf59a66d96cd067a3f15 (patch) | |
tree | 12d761052aff3dc56145957d131a19f483491707 /src/nspawn/nspawn-network.c | |
parent | test: add missing operators (diff) | |
download | systemd-e22ca70008999ec451f2cf59a66d96cd067a3f15.tar.xz systemd-e22ca70008999ec451f2cf59a66d96cd067a3f15.zip |
ether-addr-util: split out logic to mark MAC addresses as random
Diffstat (limited to '')
-rw-r--r-- | src/nspawn/nspawn-network.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-network.c b/src/nspawn/nspawn-network.c index c661f1d9e0..369d8742b6 100644 --- a/src/nspawn/nspawn-network.c +++ b/src/nspawn/nspawn-network.c @@ -95,9 +95,7 @@ static int generate_mac( assert_cc(ETH_ALEN <= sizeof(result)); memcpy(mac->ether_addr_octet, &result, ETH_ALEN); - /* see eth_random_addr in the kernel */ - mac->ether_addr_octet[0] &= 0xfe; /* clear multicast bit */ - mac->ether_addr_octet[0] |= 0x02; /* set local assignment bit (IEEE802) */ + ether_addr_mark_random(mac); return 0; } |