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

Unified Diff: webrtc/base/nethelpers.cc

Issue 2083803002: Fix IPv6 support issue. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 6 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 | webrtc/p2p/base/turnport.h » ('j') | webrtc/p2p/base/turnport.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/nethelpers.cc
diff --git a/webrtc/base/nethelpers.cc b/webrtc/base/nethelpers.cc
index fddfdaf58b5832318fe4f73d4f2ad7262f5b03bf..fa99523ec82d15371feea761eceb5cd0cea80c9f 100644
--- a/webrtc/base/nethelpers.cc
+++ b/webrtc/base/nethelpers.cc
@@ -44,8 +44,8 @@ int ResolveHostname(const std::string& hostname, int family,
addresses->clear();
struct addrinfo* result = NULL;
struct addrinfo hints = {0};
- // TODO(djw): For now this is IPv4 only so existing users remain unaffected.
- hints.ai_family = AF_INET;
+ // This should return both IPv4 and IPv6 addresses if available.
+ hints.ai_family = AF_UNSPEC;
pthatcher1 2016/06/21 05:26:54 Can you make a separate CL for this in case we hav
andresp 2016/06/21 11:36:10 I am also not sure if this AF_UNSPEC is that corre
honghaiz3 2016/06/21 18:36:06 Will do it in a separate CL.
pthatcher1 2016/06/21 18:50:17 Would it make sense to use the family already pass
honghaiz3 2016/06/21 20:06:49 I think it is safer to pass in the family. But the
pthatcher1 2016/06/21 20:55:08 Yeah, the caller would need to call address.SetFam
hints.ai_flags = AI_ADDRCONFIG;
int ret = getaddrinfo(hostname.c_str(), NULL, &hints, &result);
if (ret != 0) {
« no previous file with comments | « no previous file | webrtc/p2p/base/turnport.h » ('j') | webrtc/p2p/base/turnport.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698