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

Unified Diff: net/quic/quic_connection.cc

Issue 1420623004: On client address changes, only migrate QUIC connections when client address changes are considered… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106433678
Patch Set: Created 5 years, 1 month 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 | « net/quic/quic_connection.h ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 2fa5a12de1b49ffdbd666926733e48f1e33a221f..d465bd45dce23ec3c4d481a3532f11b184fe70a8 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1343,6 +1343,15 @@ bool QuicConnection::ProcessValidatedPacket() {
}
if (peer_ip_changed_ || peer_port_changed_) {
+ PeerAddressChangeType type = DeterminePeerAddressChangeType();
+ if (type != NO_CHANGE && type != UNKNOWN &&
+ (FLAGS_quic_disable_non_nat_address_migration &&
+ type != NAT_PORT_REBINDING && type != IPV4_SUBNET_REBINDING)) {
+ SendConnectionCloseWithDetails(QUIC_ERROR_MIGRATING_ADDRESS,
+ "Invalid peer address migration.");
+ return false;
+ }
+
IPEndPoint old_peer_address = peer_address_;
peer_address_ = IPEndPoint(
peer_ip_changed_ ? migrating_peer_ip_ : peer_address_.address(),
@@ -1741,6 +1750,10 @@ void QuicConnection::SendOrQueuePacket(QueuedPacket packet) {
}
}
+PeerAddressChangeType QuicConnection::DeterminePeerAddressChangeType() {
+ return UNKNOWN;
+}
+
void QuicConnection::SendPing() {
if (retransmission_alarm_->IsSet()) {
return;
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698