log a better error regarding smoltcp max interface limit

This commit is contained in:
Aram 🍐 2024-12-01 11:33:53 -05:00
parent e25c88410e
commit c86784ed70
2 changed files with 6 additions and 2 deletions

View file

@ -94,7 +94,9 @@ impl VirtualInterfacePoll for TcpVirtualInterface {
let mut iface = Interface::new(config, &mut device, Instant::now());
iface.update_ip_addrs(|ip_addrs| {
addresses.into_iter().for_each(|addr| {
ip_addrs.push(addr).unwrap();
ip_addrs
.push(addr)
.expect("maximum number of IPs in TCP interface reached");
});
});

View file

@ -106,7 +106,9 @@ impl VirtualInterfacePoll for UdpVirtualInterface {
let mut iface = Interface::new(config, &mut device, Instant::now());
iface.update_ip_addrs(|ip_addrs| {
addresses.into_iter().for_each(|addr| {
ip_addrs.push(addr).unwrap();
ip_addrs
.push(addr)
.expect("maximum number of IPs in UDP interface reached");
});
});