properly filter disconnected interfaces on win32

This commit is contained in:
David Rose 2013-03-14 18:59:53 +00:00
parent f229da5468
commit 517ab5d56f

View File

@ -534,6 +534,7 @@ scan_interfaces() {
if (result == ERROR_SUCCESS) {
IP_ADAPTER_ADDRESSES *p = addresses;
while (p != NULL) {
if (p->OperStatus == IfOperStatusUp) {
// p->AdapterName appears to be a GUID. Not sure if this is
// actually useful to anyone; we'll store the "friendly name"
// instead.
@ -572,6 +573,7 @@ scan_interfaces() {
}
_interfaces.push_back(interface);
}
p = p->Next;
}
}