network: nat now ignores local CIDRs and correctly represents ethernet addresses in the key

This commit is contained in:
Alex Zenla
2024-02-10 14:20:37 +00:00
parent d2136b5d8c
commit 6913e837f8
2 changed files with 28 additions and 10 deletions

View File

@ -117,7 +117,7 @@ impl NetworkBackend {
let mut udev = ChannelDevice::new(1500, tx_sender.clone());
let mac = MacAddr6::random();
let mac = smoltcp::wire::EthernetAddress(mac.to_array());
let nat = NatRouter::new(proxy, mac, tx_sender.clone());
let nat = NatRouter::new(proxy, mac, addresses.clone(), tx_sender.clone());
let mac = HardwareAddress::Ethernet(mac);
let config = Config::new(mac);
let mut iface = Interface::new(config, &mut udev, Instant::now());