summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOdd Stranne <odd@mullvad.net>2019-10-03 15:24:48 +0200
committerOdd Stranne <odd@mullvad.net>2019-10-04 10:03:17 +0200
commit73c94f778c31d23c15f2fc7e0aa4446071ff1197 (patch)
tree44bc7576a9eb883102c8a05d00700afc3a9c34d3
parented1dd8aeb3397db734a4b59d9ce0ad95b08e2e47 (diff)
downloadmullvadvpn-73c94f778c31d23c15f2fc7e0aa4446071ff1197.tar.xz
mullvadvpn-73c94f778c31d23c15f2fc7e0aa4446071ff1197.zip
Make online check more strict
-rw-r--r--windows/winnet/src/winnet/netmonitor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/windows/winnet/src/winnet/netmonitor.cpp b/windows/winnet/src/winnet/netmonitor.cpp
index 861ec69f3e..777925cce3 100644
--- a/windows/winnet/src/winnet/netmonitor.cpp
+++ b/windows/winnet/src/winnet/netmonitor.cpp
@@ -117,7 +117,12 @@ void NetMonitor::AddCacheEntry(Cache &cache, const MIB_IF_ROW2 &iface)
{
e.luid = iface.InterfaceLuid.Value;
e.valid = true;
- e.connected = (MediaConnectStateConnected == iface.MediaConnectState);
+ e.connected =
+ (
+ NET_IF_ADMIN_STATUS_UP == iface.AdminStatus
+ && IfOperStatusUp == iface.OperStatus
+ && MediaConnectStateConnected == iface.MediaConnectState
+ );
}
else
{