Commit 2d850b9c authored by Zhongyi Shi's avatar Zhongyi Shi Committed by Commit Bot

Add a new QUIC error code for connection migration, which will be used to...

Add a new QUIC error code for connection migration, which will be used to close the connection when migration is triggered before handshake is confirmed.

Manually merge internal change: 205108882

Bug: 790547
Change-Id: Id337b125c38b9d06d892a9f3a235f61d10f3eaf4
Reviewed-on: https://chromium-review.googlesource.com/1142379Reviewed-by: default avatarRyan Hamilton <rch@chromium.org>
Commit-Queue: Zhongyi Shi <zhongyi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576246}
parent 5c411791
...@@ -242,6 +242,9 @@ const struct QuicErrorMapping { ...@@ -242,6 +242,9 @@ const struct QuicErrorMapping {
// Network changed, but error was encountered on the alternative network. // Network changed, but error was encountered on the alternative network.
{quic::QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR, {quic::QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR,
"quic.connection_migration_internal_error"}, "quic.connection_migration_internal_error"},
// Network changed, but error was encountered on the alternative network.
{quic::QUIC_CONNECTION_MIGRATION_HANDSHAKE_UNCONFIRMED,
"quic.connection_migration_handshake_unconfirmed"},
// Stream frame overlaps with buffered data. // Stream frame overlaps with buffered data.
{quic::QUIC_OVERLAPPING_STREAM_DATA, "quic.overlapping_stream_data"}, {quic::QUIC_OVERLAPPING_STREAM_DATA, "quic.overlapping_stream_data"},
......
...@@ -147,6 +147,7 @@ const char* QuicErrorCodeToString(QuicErrorCode error) { ...@@ -147,6 +147,7 @@ const char* QuicErrorCodeToString(QuicErrorCode error) {
RETURN_STRING_LITERAL(QUIC_INVALID_STOP_SENDING_FRAME_DATA); RETURN_STRING_LITERAL(QUIC_INVALID_STOP_SENDING_FRAME_DATA);
RETURN_STRING_LITERAL(QUIC_INVALID_PATH_CHALLENGE_DATA); RETURN_STRING_LITERAL(QUIC_INVALID_PATH_CHALLENGE_DATA);
RETURN_STRING_LITERAL(QUIC_INVALID_PATH_RESPONSE_DATA); RETURN_STRING_LITERAL(QUIC_INVALID_PATH_RESPONSE_DATA);
RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_HANDSHAKE_UNCONFIRMED);
RETURN_STRING_LITERAL(QUIC_LAST_ERROR); RETURN_STRING_LITERAL(QUIC_LAST_ERROR);
// Intentionally have no default case, so we'll break the build // Intentionally have no default case, so we'll break the build
// if we add errors and don't put them here. // if we add errors and don't put them here.
......
...@@ -267,6 +267,8 @@ enum QuicErrorCode { ...@@ -267,6 +267,8 @@ enum QuicErrorCode {
QUIC_CONNECTION_MIGRATION_DISABLED_BY_CONFIG = 99, QUIC_CONNECTION_MIGRATION_DISABLED_BY_CONFIG = 99,
// Network changed, but error was encountered on the alternative network. // Network changed, but error was encountered on the alternative network.
QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR = 100, QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR = 100,
// Network changed, but handshake is not confirmed yet.
QUIC_CONNECTION_MIGRATION_HANDSHAKE_UNCONFIRMED = 111,
// Stream frames arrived too discontiguously so that stream sequencer buffer // Stream frames arrived too discontiguously so that stream sequencer buffer
// maintains too many intervals. // maintains too many intervals.
...@@ -302,7 +304,7 @@ enum QuicErrorCode { ...@@ -302,7 +304,7 @@ enum QuicErrorCode {
QUIC_INVALID_PATH_RESPONSE_DATA = 110, QUIC_INVALID_PATH_RESPONSE_DATA = 110,
// No error. Used as bound while iterating. // No error. Used as bound while iterating.
QUIC_LAST_ERROR = 111, QUIC_LAST_ERROR = 112,
}; };
// QuicErrorCodes is encoded as a single octet on-the-wire. // QuicErrorCodes is encoded as a single octet on-the-wire.
static_assert(static_cast<int>(QUIC_LAST_ERROR) <= static_assert(static_cast<int>(QUIC_LAST_ERROR) <=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment