1
0
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:
rklabs
2015-07-22 22:06:21 +05:30
parent d09450980a
commit 97e6a99c5e

View File

@@ -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;
}