Bug 1191258 - check for IFF_RUNNING to detect online interfaces. r=mcmanus
authorDaniel Stenberg <daniel@haxx.se>
Wed, 05 Aug 2015 03:22:00 +0200
changeset 288419 2de6ae32d73b44de63e5360687c502aa79d1159f
parent 288418 90d854c1fb68cf9bdf5b07f1c1c8940d3315d93d
child 288420 106c0863db60127996c8cea813c1ee93026ec27a
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1191258
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1191258 - check for IFF_RUNNING to detect online interfaces. r=mcmanus
netwerk/system/linux/nsNotifyAddrListener_Linux.cpp
--- a/netwerk/system/linux/nsNotifyAddrListener_Linux.cpp
+++ b/netwerk/system/linux/nsNotifyAddrListener_Linux.cpp
@@ -118,17 +118,17 @@ void nsNotifyAddrListener::checkLink(voi
     for (ifa = list; ifa != NULL; ifa = ifa->ifa_next) {
         int family;
         if (ifa->ifa_addr == NULL)
             continue;
 
         family = ifa->ifa_addr->sa_family;
 
         if ((family == AF_INET || family == AF_INET6) &&
-            (ifa->ifa_flags & IFF_UP) &&
+            (ifa->ifa_flags & IFF_RUNNING) &&
             !(ifa->ifa_flags & IFF_LOOPBACK)) {
             // An interface that is UP and not loopback
             link = true;
             break;
         }
     }
     mLinkUp = link;
     freeifaddrs(list);