| Index: net/quic/quic_connection.h
|
| diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
|
| index 89affd3c4376ca24e0c1df3a6703ecbfa53b1bab..f5e152f75343c3a58689becb30fc859cba41227c 100644
|
| --- a/net/quic/quic_connection.h
|
| +++ b/net/quic/quic_connection.h
|
| @@ -417,9 +417,9 @@ class NET_EXPORT_PRIVATE QuicConnection
|
| // initially encrypted packets when the initial encrypter changes.
|
| void RetransmitUnackedPackets(RetransmissionType retransmission_type);
|
|
|
| - // Calls |sent_packet_manager_|'s DiscardUnencryptedPackets. Used when the
|
| + // Calls |sent_packet_manager_|'s NeuterUnencryptedPackets. Used when the
|
| // connection becomes forward secure and hasn't received acks for all packets.
|
| - void DiscardUnencryptedPackets();
|
| + void NeuterUnencryptedPackets();
|
|
|
| // Changes the encrypter used for level |level| to |encrypter|. The function
|
| // takes ownership of |encrypter|.
|
| @@ -458,8 +458,7 @@ class NET_EXPORT_PRIVATE QuicConnection
|
| }
|
|
|
| bool CanWrite(TransmissionType transmission_type,
|
| - HasRetransmittableData retransmittable,
|
| - IsHandshake handshake);
|
| + HasRetransmittableData retransmittable);
|
|
|
| uint32 max_flow_control_receive_window_bytes() const {
|
| return max_flow_control_receive_window_bytes_;
|
| @@ -611,6 +610,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 +627,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 +740,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.
|
| + bool self_port_changed_;
|
|
|
| // If non-empty this contains the set of versions received in a
|
| // version negotiation packet.
|
|
|