mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-03 07:19:37 +00:00 
			
		
		
		
	network: ensure multicast bit is unset in random mac addresses
This commit is contained in:
		@ -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());
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user