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

Side by Side Diff: net/quic/core/quic_connection.cc

Issue 2424903002: Deprecate FLAGS_quic_allow_server_address_change_for_mapped_ipv4. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_connection.h" 5 #include "net/quic/core/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 ScopedPacketBundler bundler(this, SEND_ACK_IF_QUEUED); 1414 ScopedPacketBundler bundler(this, SEND_ACK_IF_QUEUED);
1415 OnCanWrite(); 1415 OnCanWrite();
1416 } 1416 }
1417 } 1417 }
1418 1418
1419 bool QuicConnection::ProcessValidatedPacket(const QuicPacketHeader& header) { 1419 bool QuicConnection::ProcessValidatedPacket(const QuicPacketHeader& header) {
1420 if (perspective_ == Perspective::IS_SERVER && 1420 if (perspective_ == Perspective::IS_SERVER &&
1421 IsInitializedIPEndPoint(self_address_) && 1421 IsInitializedIPEndPoint(self_address_) &&
1422 IsInitializedIPEndPoint(last_packet_destination_address_) && 1422 IsInitializedIPEndPoint(last_packet_destination_address_) &&
1423 (!(self_address_ == last_packet_destination_address_))) { 1423 (!(self_address_ == last_packet_destination_address_))) {
1424 if (!FLAGS_quic_allow_server_address_change_for_mapped_ipv4) {
1425 CloseConnection(QUIC_ERROR_MIGRATING_ADDRESS,
1426 "Self address migration is not supported at the server.",
1427 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
1428 return false;
1429 }
1430 // Allow change between pure IPv4 and equivalent mapped IPv4 address. 1424 // Allow change between pure IPv4 and equivalent mapped IPv4 address.
1431 IPAddress self_ip = self_address_.address(); 1425 IPAddress self_ip = self_address_.address();
1432 if (self_ip.IsIPv4MappedIPv6()) { 1426 if (self_ip.IsIPv4MappedIPv6()) {
1433 self_ip = ConvertIPv4MappedIPv6ToIPv4(self_ip); 1427 self_ip = ConvertIPv4MappedIPv6ToIPv4(self_ip);
1434 } 1428 }
1435 IPAddress last_packet_destination_ip = 1429 IPAddress last_packet_destination_ip =
1436 last_packet_destination_address_.address(); 1430 last_packet_destination_address_.address();
1437 if (last_packet_destination_ip.IsIPv4MappedIPv6()) { 1431 if (last_packet_destination_ip.IsIPv4MappedIPv6()) {
1438 last_packet_destination_ip = 1432 last_packet_destination_ip =
1439 ConvertIPv4MappedIPv6ToIPv4(last_packet_destination_ip); 1433 ConvertIPv4MappedIPv6ToIPv4(last_packet_destination_ip);
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2590 2584
2591 void QuicConnection::CheckIfApplicationLimited() { 2585 void QuicConnection::CheckIfApplicationLimited() {
2592 if (queued_packets_.empty() && 2586 if (queued_packets_.empty() &&
2593 !sent_packet_manager_->HasPendingRetransmissions() && 2587 !sent_packet_manager_->HasPendingRetransmissions() &&
2594 !visitor_->WillingAndAbleToWrite()) { 2588 !visitor_->WillingAndAbleToWrite()) {
2595 sent_packet_manager_->OnApplicationLimited(); 2589 sent_packet_manager_->OnApplicationLimited();
2596 } 2590 }
2597 } 2591 }
2598 2592
2599 } // namespace net 2593 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698