mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 21:00:55 +00:00
network: ensure multicast bit is unset in random mac addresses
This commit is contained in:
parent
f96f9d8abf
commit
dbfc07b026
@ -85,6 +85,7 @@ impl Controller {
|
||||
|
||||
let mut mac = MacAddr6::random();
|
||||
mac.set_local(true);
|
||||
mac.set_multicast(false);
|
||||
let ipv4 = self.allocate_ipv4()?;
|
||||
let ipv6 = mac.to_link_local_ipv6();
|
||||
let launch_config = LaunchInfo {
|
||||
|
@ -132,6 +132,7 @@ impl NetworkBackend {
|
||||
let mac = self.force_mac_address.unwrap_or_else(|| {
|
||||
let mut mac = MacAddr6::random();
|
||||
mac.set_local(true);
|
||||
mac.set_multicast(false);
|
||||
mac
|
||||
});
|
||||
let mac = smoltcp::wire::EthernetAddress(mac.to_array());
|
||||
|
Loading…
Reference in New Issue
Block a user