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

Unified Diff: net/tools/quic/quic_client.cc

Issue 397793004: Replace setsockopt(IP_PKTINFO) and setsockopt(IPV6_RECVPKTINFO) calls by (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | net/tools/quic/quic_server.cc » ('j') | net/tools/quic/quic_server.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client.cc
diff --git a/net/tools/quic/quic_client.cc b/net/tools/quic/quic_client.cc
index 19e98013af23795a1e681744b655ed393ffccc04..c4434347087cf0a210471af3974d8a030f5e4035 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -124,15 +124,7 @@ bool QuicClient::CreateUDPSocket() {
return false;
}
- int get_local_ip = 1;
- if (address_family == AF_INET) {
- rc = setsockopt(fd_, IPPROTO_IP, IP_PKTINFO,
- &get_local_ip, sizeof(get_local_ip));
- } else {
- rc = setsockopt(fd_, IPPROTO_IPV6, IPV6_RECVPKTINFO,
- &get_local_ip, sizeof(get_local_ip));
- }
-
+ rc = QuicSocketUtils::SetGetAddressInfo(fd_, address_family);
if (rc < 0) {
LOG(ERROR) << "IP detection not supported" << strerror(errno);
return false;
« no previous file with comments | « no previous file | net/tools/quic/quic_server.cc » ('j') | net/tools/quic/quic_server.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698