Chromium Code Reviews| 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) { |