Index: net/quic/quic_connection.h |
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h |
index 89affd3c4376ca24e0c1df3a6703ecbfa53b1bab..745cf85f2c73ac529dafb85de8304ff7b4178469 100644 |
--- a/net/quic/quic_connection.h |
+++ b/net/quic/quic_connection.h |
@@ -611,6 +611,11 @@ class NET_EXPORT_PRIVATE QuicConnection |
// Sets the ping alarm to the appropriate value, if any. |
void SetPingAlarm(); |
+ // On arrival of a new packet, checks to see if the socket addresses have |
+ // changed since the last packet we saw on this connection. |
+ void CheckForAddressMigration(const IPEndPoint& self_address, |
+ const IPEndPoint& peer_address); |
+ |
QuicFramer framer_; |
QuicConnectionHelperInterface* helper_; // Not owned. |
QuicPacketWriter* writer_; // Not owned. |
@@ -623,6 +628,8 @@ class NET_EXPORT_PRIVATE QuicConnection |
// client. |
IPEndPoint self_address_; |
IPEndPoint peer_address_; |
+ // Used to store latest peer port to possibly migrate to later. |
+ int migrating_peer_port_; |
bool last_packet_revived_; // True if the last packet was revived from FEC. |
size_t last_size_; // Size of the last received packet. |
@@ -734,9 +741,21 @@ class NET_EXPORT_PRIVATE QuicConnection |
// close. |
bool connected_; |
- // Set to true if the udp packet headers have a new self or peer address. |
- // This is checked later on validating a data or version negotiation packet. |
- bool address_migrating_; |
+ // Set to true if the UDP packet headers have a new IP address for the peer. |
+ // If true, do not perform connection migration. |
+ bool peer_ip_changed_; |
+ |
+ // Set to true if the UDP packet headers have a new port for the peer. |
+ // If true, and the IP has not changed, then we can migrate the connection. |
+ bool peer_port_changed_; |
+ |
+ // Set to true if the UDP packet headers are addressed to a different IP. |
+ // We do not support connection migration when the self IP changed. |
+ bool self_ip_changed_; |
+ |
+ // Set to true if the UDP packet headers are addressed to a different port. |
+ // If true, and the IP has not changed, then we can migrate the connection. |
wtc
2014/05/13 16:37:15
IMPORTANT: this comment doesn't match the code in
Robbie Shade
2014/05/13 21:31:21
Correct - this comment is wrong, make the change w
ramant (doing other things)
2014/05/14 05:30:23
Made this change in https://codereview.chromium.or
|
+ bool self_port_changed_; |
// If non-empty this contains the set of versions received in a |
// version negotiation packet. |