return a PCAP error when trying to start a capture from an unknown adapter name

This commit is contained in:
GyulyVGC
2025-11-10 18:33:03 +01:00
parent 54e47a093a
commit 930d5e8fad
2 changed files with 3 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ All Sniffnet releases with the relative changes are documented in this file.
## [UNRELEASED]
- Add animated welcome screen ([#1002](https://github.com/GyulyVGC/sniffnet/pull/1002))
- Return a PCAP error when trying to start a capture from an unknown adapter name
## [1.4.2] - 2025-11-04
- Send remote notifications via webhook ([#991](https://github.com/GyulyVGC/sniffnet/pull/991) — fixes [#841](https://github.com/GyulyVGC/sniffnet/issues/841))

View File

@@ -20,12 +20,12 @@ impl MyDevice {
return device;
}
}
Device::lookup().unwrap_or(None).unwrap_or_else(|| Device {
Device {
name: String::new(),
desc: None,
addresses: vec![],
flags: DeviceFlags::empty(),
})
}
}
pub fn from_pcap_device(device: Device) -> Self {