From 9dfe7aac2ec182331ce5c5b717b51b37c481c7ac Mon Sep 17 00:00:00 2001 From: "guoweis@webrtc.org" Date: Wed, 18 Feb 2015 20:27:17 +0000 Subject: [PATCH] Fix WebRTC IP leaks. WebRTC binds to individual NICs and listens for incoming Stun packets. Sending stun through this specific NIC binding could make OS route the packet differently hence exposing non-VPN public IP. The fix here is 1. to bind to any address (0:0:0:0) instead. This way, the routing will be the same as how chrome/http is. 2. also, remove the any all 0s addresses which happens when we bind to all 0s. BUG=4276 R=juberti@webrtc.org Committed: https://code.google.com/p/webrtc/source/detail?r=8418 Committed: https://code.google.com/p/webrtc/source/detail?r=8419 Review URL: https://webrtc-codereview.appspot.com/39129004 Cr-Commit-Position: refs/heads/master@{#8420} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8420 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/base/network.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webrtc/base/network.h b/webrtc/base/network.h index 36aa5f82e4..089d86bbdf 100644 --- a/webrtc/base/network.h +++ b/webrtc/base/network.h @@ -83,7 +83,8 @@ class NetworkManager { // IP address. (i.e. INADDR_ANY for IPv4 or in6addr_any for IPv6). This is // useful as binding to such interfaces allow default routing behavior like // http traffic. - virtual void GetAnyAddressNetworks(NetworkList* networks) = 0; + // TODO(guoweis): remove this body when chromium implements this. + virtual void GetAnyAddressNetworks(NetworkList* networks) {} // Dumps a list of networks available to LS_INFO. virtual void DumpNetworks(bool include_ignored) {}