Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: runtime/bin/socket_linux.cc

Issue 18268003: Take into account virtual devices (e.g. OpenVPN tun0) when iterating network (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/socket_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_linux.cc
===================================================================
--- runtime/bin/socket_linux.cc (revision 24856)
+++ runtime/bin/socket_linux.cc (working copy)
@@ -246,6 +246,10 @@
static bool ShouldIncludeIfaAddrs(struct ifaddrs* ifa, int lookup_family) {
+ if (ifa->ifa_addr == NULL) {
+ // OpenVPN's virtual device tun0.
+ return false;
+ }
int family = ifa->ifa_addr->sa_family;
if (lookup_family == family) return true;
if (lookup_family == AF_UNSPEC &&
« no previous file with comments | « no previous file | runtime/bin/socket_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698