mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Add additional check for found_ip in case of tunnel interface and then raise exception
This commit is contained in:
@@ -225,6 +225,10 @@ NetworkInterface::Info NetworkInterface::info() const {
|
||||
info.is_up = false;
|
||||
Utils::generic_iface_loop(collector);
|
||||
|
||||
if(!collector.found_hw && !collector.found_ip) {
|
||||
throw std::runtime_error("Error looking up interface address");
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user