OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/domain_reliability/quic_error_mapping.h" | 5 #include "components/domain_reliability/quic_error_mapping.h" |
6 | 6 |
7 namespace domain_reliability { | 7 namespace domain_reliability { |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 const struct QuicErrorMapping { | 11 const struct QuicErrorMapping { |
12 net::QuicErrorCode quic_error; | 12 net::QuicErrorCode quic_error; |
13 const char* beacon_quic_error; | 13 const char* beacon_quic_error; |
14 } kQuicErrorMap[] = { | 14 } kQuicErrorMap[] = { |
15 // Connection has reached an invalid state. | 15 // Connection has reached an invalid state. |
16 { net::QUIC_INTERNAL_ERROR, "quic.internal_error" }, | 16 {net::QUIC_INTERNAL_ERROR, "quic.internal_error"}, |
17 // There were data frames after the a fin or reset. | 17 // There were data frames after the a fin or reset. |
18 { net::QUIC_STREAM_DATA_AFTER_TERMINATION, | 18 {net::QUIC_STREAM_DATA_AFTER_TERMINATION, |
19 "quic.stream_data.after_termination" }, | 19 "quic.stream_data.after_termination"}, |
20 // Control frame is malformed. | 20 // Control frame is malformed. |
21 { net::QUIC_INVALID_PACKET_HEADER, "quic.invalid.packet_header" }, | 21 {net::QUIC_INVALID_PACKET_HEADER, "quic.invalid.packet_header"}, |
22 // Frame data is malformed. | 22 // Frame data is malformed. |
23 { net::QUIC_INVALID_FRAME_DATA, "quic.invalid_frame_data" }, | 23 {net::QUIC_INVALID_FRAME_DATA, "quic.invalid_frame_data"}, |
24 // The packet contained no payload. | 24 // The packet contained no payload. |
25 { net::QUIC_MISSING_PAYLOAD, "quic.missing.payload" }, | 25 {net::QUIC_MISSING_PAYLOAD, "quic.missing.payload"}, |
26 // FEC data is malformed. | 26 // FEC data is malformed. |
27 { net::QUIC_INVALID_FEC_DATA, "quic.invalid.fec_data" }, | 27 {net::QUIC_INVALID_FEC_DATA, "quic.invalid.fec_data"}, |
28 // STREAM frame data is malformed. | 28 // STREAM frame data is malformed. |
29 { net::QUIC_INVALID_STREAM_DATA, "quic.invalid.stream_data" }, | 29 {net::QUIC_INVALID_STREAM_DATA, "quic.invalid.stream_data"}, |
30 // STREAM frame data is not encrypted. | 30 // STREAM frame data is not encrypted. |
31 { net::QUIC_UNENCRYPTED_STREAM_DATA, "quic.unencrypted.stream_data" }, | 31 {net::QUIC_UNENCRYPTED_STREAM_DATA, "quic.unencrypted.stream_data"}, |
32 // Attempt to send unencrypted STREAM frame. | 32 // Attempt to send unencrypted STREAM frame. |
33 { net::QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA, | 33 {net::QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA, |
34 "quic.attempt.to.unencrypted.stream.data" }, | 34 "quic.attempt.to.unencrypted.stream.data"}, |
35 // Received a frame which is likely the result of memory corruption. | 35 // Received a frame which is likely the result of memory corruption. |
36 { net::QUIC_MAYBE_CORRUPTED_MEMORY, "quic.maybe.corrupted.momery" }, | 36 {net::QUIC_MAYBE_CORRUPTED_MEMORY, "quic.maybe.corrupted.momery"}, |
37 // FEC frame data is not encrypted. | 37 // FEC frame data is not encrypted. |
38 { net::QUIC_UNENCRYPTED_FEC_DATA, "quic.unencrypted.fec.data" }, | 38 {net::QUIC_UNENCRYPTED_FEC_DATA, "quic.unencrypted.fec.data"}, |
39 // RST_STREAM frame data is malformed. | 39 // RST_STREAM frame data is malformed. |
40 { net::QUIC_INVALID_RST_STREAM_DATA, "quic.invalid.rst_stream_data" }, | 40 {net::QUIC_INVALID_RST_STREAM_DATA, "quic.invalid.rst_stream_data"}, |
41 // CONNECTION_CLOSE frame data is malformed. | 41 // CONNECTION_CLOSE frame data is malformed. |
42 { net::QUIC_INVALID_CONNECTION_CLOSE_DATA, | 42 {net::QUIC_INVALID_CONNECTION_CLOSE_DATA, |
43 "quic.invalid.connection_close_data" }, | 43 "quic.invalid.connection_close_data"}, |
44 // GOAWAY frame data is malformed. | 44 // GOAWAY frame data is malformed. |
45 { net::QUIC_INVALID_GOAWAY_DATA, "quic.invalid.goaway_data" }, | 45 {net::QUIC_INVALID_GOAWAY_DATA, "quic.invalid.goaway_data"}, |
46 // WINDOW_UPDATE frame data is malformed. | 46 // WINDOW_UPDATE frame data is malformed. |
47 { net::QUIC_INVALID_WINDOW_UPDATE_DATA, "quic.invalid.window_update_data" }, | 47 {net::QUIC_INVALID_WINDOW_UPDATE_DATA, "quic.invalid.window_update_data"}, |
48 // BLOCKED frame data is malformed. | 48 // BLOCKED frame data is malformed. |
49 { net::QUIC_INVALID_BLOCKED_DATA, "quic.invalid.blocked_data" }, | 49 {net::QUIC_INVALID_BLOCKED_DATA, "quic.invalid.blocked_data"}, |
50 // STOP_WAITING frame data is malformed. | 50 // STOP_WAITING frame data is malformed. |
51 { net::QUIC_INVALID_STOP_WAITING_DATA, "quic.invalid.stop_waiting_data" }, | 51 {net::QUIC_INVALID_STOP_WAITING_DATA, "quic.invalid.stop_waiting_data"}, |
52 // PATH_CLOSE frame data is malformed. | 52 // PATH_CLOSE frame data is malformed. |
53 { net::QUIC_INVALID_PATH_CLOSE_DATA, "quic.invalid_path_close_data" }, | 53 {net::QUIC_INVALID_PATH_CLOSE_DATA, "quic.invalid_path_close_data"}, |
54 // ACK frame data is malformed. | 54 // ACK frame data is malformed. |
55 { net::QUIC_INVALID_ACK_DATA, "quic.invalid.ack_data" }, | 55 {net::QUIC_INVALID_ACK_DATA, "quic.invalid.ack_data"}, |
56 | 56 |
57 // Version negotiation packet is malformed. | 57 // Version negotiation packet is malformed. |
58 { net::QUIC_INVALID_VERSION_NEGOTIATION_PACKET, | 58 {net::QUIC_INVALID_VERSION_NEGOTIATION_PACKET, |
59 "quic_invalid_version_negotiation_packet" }, | 59 "quic_invalid_version_negotiation_packet"}, |
60 // Public RST packet is malformed. | 60 // Public RST packet is malformed. |
61 { net::QUIC_INVALID_PUBLIC_RST_PACKET, "quic.invalid.public_rst_packet" }, | 61 {net::QUIC_INVALID_PUBLIC_RST_PACKET, "quic.invalid.public_rst_packet"}, |
62 | 62 |
63 // There was an error decrypting. | 63 // There was an error decrypting. |
64 { net::QUIC_DECRYPTION_FAILURE, "quic.decryption.failure" }, | 64 {net::QUIC_DECRYPTION_FAILURE, "quic.decryption.failure"}, |
65 // There was an error encrypting. | 65 // There was an error encrypting. |
66 { net::QUIC_ENCRYPTION_FAILURE, "quic.encryption.failure" }, | 66 {net::QUIC_ENCRYPTION_FAILURE, "quic.encryption.failure"}, |
67 // The packet exceeded kMaxPacketSize. | 67 // The packet exceeded kMaxPacketSize. |
68 { net::QUIC_PACKET_TOO_LARGE, "quic.packet.too_large" }, | 68 {net::QUIC_PACKET_TOO_LARGE, "quic.packet.too_large"}, |
69 // The peer is going away. May be a client or server. | 69 // The peer is going away. May be a client or server. |
70 { net::QUIC_PEER_GOING_AWAY, "quic.peer_going_away" }, | 70 {net::QUIC_PEER_GOING_AWAY, "quic.peer_going_away"}, |
71 // A stream ID was invalid. | 71 // A stream ID was invalid. |
72 { net::QUIC_INVALID_STREAM_ID, "quic.invalid_stream_id" }, | 72 {net::QUIC_INVALID_STREAM_ID, "quic.invalid_stream_id"}, |
73 // A priority was invalid. | 73 // A priority was invalid. |
74 { net::QUIC_INVALID_PRIORITY, "quic.invalid_priority" }, | 74 {net::QUIC_INVALID_PRIORITY, "quic.invalid_priority"}, |
75 // Too many streams already open. | 75 // Too many streams already open. |
76 { net::QUIC_TOO_MANY_OPEN_STREAMS, "quic.too_many_open_streams" }, | 76 {net::QUIC_TOO_MANY_OPEN_STREAMS, "quic.too_many_open_streams"}, |
77 // The peer created too many available streams. | 77 // The peer created too many available streams. |
78 { net::QUIC_TOO_MANY_AVAILABLE_STREAMS, "quic.too_many_available_streams" }, | 78 {net::QUIC_TOO_MANY_AVAILABLE_STREAMS, "quic.too_many_available_streams"}, |
79 // Received public reset for this connection. | 79 // Received public reset for this connection. |
80 { net::QUIC_PUBLIC_RESET, "quic.public_reset" }, | 80 {net::QUIC_PUBLIC_RESET, "quic.public_reset"}, |
81 // Invalid protocol version. | 81 // Invalid protocol version. |
82 { net::QUIC_INVALID_VERSION, "quic.invalid_version" }, | 82 {net::QUIC_INVALID_VERSION, "quic.invalid_version"}, |
83 | 83 |
84 // The Header ID for a stream was too far from the previous. | 84 // The Header ID for a stream was too far from the previous. |
85 { net::QUIC_INVALID_HEADER_ID, "quic.invalid_header_id" }, | 85 {net::QUIC_INVALID_HEADER_ID, "quic.invalid_header_id"}, |
86 // Negotiable parameter received during handshake had invalid value. | 86 // Negotiable parameter received during handshake had invalid value. |
87 { net::QUIC_INVALID_NEGOTIATED_VALUE, "quic.invalid_negotiated_value" }, | 87 {net::QUIC_INVALID_NEGOTIATED_VALUE, "quic.invalid_negotiated_value"}, |
88 // There was an error decompressing data. | 88 // There was an error decompressing data. |
89 { net::QUIC_DECOMPRESSION_FAILURE, "quic.decompression_failure" }, | 89 {net::QUIC_DECOMPRESSION_FAILURE, "quic.decompression_failure"}, |
90 // We hit our prenegotiated (or default) timeout | 90 // We hit our prenegotiated (or default) timeout |
91 { net::QUIC_NETWORK_IDLE_TIMEOUT, "quic.connection.idle_time_out" }, | 91 {net::QUIC_NETWORK_IDLE_TIMEOUT, "quic.connection.idle_time_out"}, |
92 // We hit our overall connection timeout | 92 // We hit our overall connection timeout |
93 { net::QUIC_HANDSHAKE_TIMEOUT, | 93 {net::QUIC_HANDSHAKE_TIMEOUT, "quic.connection.handshake_timed_out"}, |
94 "quic.connection.handshake_timed_out" }, | 94 // There was an error encountered migrating addresses. |
95 // There was an error encountered migrating addresses. | 95 {net::QUIC_ERROR_MIGRATING_ADDRESS, "quic.error_migrating_address"}, |
96 { net::QUIC_ERROR_MIGRATING_ADDRESS, "quic.error_migrating_address" }, | 96 // There was an error encountered migrating port only. |
97 // There was an error encountered migrating port only. | 97 {net::QUIC_ERROR_MIGRATING_PORT, "quic.error_migrating_port"}, |
98 { net::QUIC_ERROR_MIGRATING_PORT, "quic.error_migrating_port" }, | 98 // There was an error while writing to the socket. |
99 // There was an error while writing to the socket. | 99 {net::QUIC_PACKET_WRITE_ERROR, "quic.packet.write_error"}, |
100 { net::QUIC_PACKET_WRITE_ERROR, "quic.packet.write_error" }, | 100 // There was an error while reading from the socket. |
101 // There was an error while reading from the socket. | 101 {net::QUIC_PACKET_READ_ERROR, "quic.packet.read_error"}, |
102 { net::QUIC_PACKET_READ_ERROR, "quic.packet.read_error" }, | 102 // We received a STREAM_FRAME with no data and no fin flag set. |
103 // We received a STREAM_FRAME with no data and no fin flag set. | 103 {net::QUIC_EMPTY_STREAM_FRAME_NO_FIN, "quic.empty_stream_frame_no_fin"}, |
104 { net::QUIC_EMPTY_STREAM_FRAME_NO_FIN, "quic.empty_stream_frame_no_fin" }, | 104 // We received invalid data on the headers stream. |
105 // We received invalid data on the headers stream. | 105 {net::QUIC_INVALID_HEADERS_STREAM_DATA, "quic.invalid_headers_stream_data"}, |
106 { net::QUIC_INVALID_HEADERS_STREAM_DATA, "quic.invalid_headers_stream_data" }, | 106 // The peer received too much data, violating flow control. |
107 // The peer received too much data, violating flow control. | 107 {net::QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA, |
108 { net::QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA, | 108 "quic.flow_control.received_too_much_data"}, |
109 "quic.flow_control.received_too_much_data" }, | 109 // The peer sent too much data, violating flow control. |
110 // The peer sent too much data, violating flow control. | 110 {net::QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA, |
111 { net::QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA, | 111 "quic.flow_control.sent_too_much_data"}, |
112 "quic.flow_control.sent_too_much_data" }, | 112 // The peer received an invalid flow control window. |
113 // The peer received an invalid flow control window. | 113 {net::QUIC_FLOW_CONTROL_INVALID_WINDOW, "quic.flow_control.invalid_window"}, |
114 { net::QUIC_FLOW_CONTROL_INVALID_WINDOW, "quic.flow_control.invalid_window" }, | 114 // The connection has been IP pooled into an existing connection. |
115 // The connection has been IP pooled into an existing connection. | 115 {net::QUIC_CONNECTION_IP_POOLED, "quic.connection.ip_pooled"}, |
116 { net::QUIC_CONNECTION_IP_POOLED, "quic.connection.ip_pooled" }, | 116 // The connection has too many outstanding sent packets. |
117 // The connection has too many outstanding sent packets. | 117 {net::QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS, |
118 { net::QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS, | 118 "quic.too_many_outstanding_sent_packets"}, |
119 "quic.too_many_outstanding_sent_packets" }, | 119 // The connection has too many outstanding received packets. |
120 // The connection has too many outstanding received packets. | 120 {net::QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS, |
121 { net::QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS, | 121 "quic.too_many_outstanding_received_packets"}, |
122 "quic.too_many_outstanding_received_packets" }, | 122 // The quic connection job to load server config is cancelled. |
123 // The quic connection job to load server config is cancelled. | 123 {net::QUIC_CONNECTION_CANCELLED, "quic.connection.cancelled"}, |
124 { net::QUIC_CONNECTION_CANCELLED, "quic.connection.cancelled" }, | 124 // Disabled QUIC because of high packet loss rate. |
125 // Disabled QUIC because of high packet loss rate. | 125 {net::QUIC_BAD_PACKET_LOSS_RATE, "quic.bad_packet_loss_rate"}, |
126 { net::QUIC_BAD_PACKET_LOSS_RATE, "quic.bad_packet_loss_rate" }, | 126 // Disabled QUIC because of too many PUBLIC_RESETs post handshake. |
127 // Disabled QUIC because of too many PUBLIC_RESETs post handshake. | 127 {net::QUIC_PUBLIC_RESETS_POST_HANDSHAKE, |
128 { net::QUIC_PUBLIC_RESETS_POST_HANDSHAKE, | 128 "quic.public_resets_post_handshake"}, |
129 "quic.public_resets_post_handshake" }, | 129 // Disabled QUIC because of too many timeouts with streams open. |
130 // Disabled QUIC because of too many timeouts with streams open. | 130 {net::QUIC_TIMEOUTS_WITH_OPEN_STREAMS, "quic.timeouts_with_open_streams"}, |
131 { net::QUIC_TIMEOUTS_WITH_OPEN_STREAMS, "quic.timeouts_with_open_streams" }, | 131 // Closed because we failed to serialize a packet. |
132 // Closed because we failed to serialize a packet. | 132 {net::QUIC_FAILED_TO_SERIALIZE_PACKET, "quic.failed_to_serialize_packet"}, |
133 { net::QUIC_FAILED_TO_SERIALIZE_PACKET, "quic.failed_to_serialize_packet" }, | 133 // QUIC timed out after too many RTOs. |
134 // QUIC timed out after too many RTOs. | 134 {net::QUIC_TOO_MANY_RTOS, "quic.too_many_rtos"}, |
135 { net::QUIC_TOO_MANY_RTOS, "quic.too_many_rtos" }, | 135 // Crypto errors. |
136 // Crypto errors. | 136 |
137 | 137 // Hanshake failed. |
138 // Hanshake failed. | 138 {net::QUIC_HANDSHAKE_FAILED, "quic.handshake_failed"}, |
139 { net::QUIC_HANDSHAKE_FAILED, "quic.handshake_failed" }, | 139 // Handshake message contained out of order tags. |
140 // Handshake message contained out of order tags. | 140 {net::QUIC_CRYPTO_TAGS_OUT_OF_ORDER, "quic.crypto.tags_out_of_order"}, |
141 { net::QUIC_CRYPTO_TAGS_OUT_OF_ORDER, "quic.crypto.tags_out_of_order" }, | 141 // Handshake message contained too many entries. |
142 // Handshake message contained too many entries. | 142 {net::QUIC_CRYPTO_TOO_MANY_ENTRIES, "quic.crypto.too_many_entries"}, |
143 { net::QUIC_CRYPTO_TOO_MANY_ENTRIES, "quic.crypto.too_many_entries" }, | 143 // Handshake message contained an invalid value length. |
144 // Handshake message contained an invalid value length. | 144 {net::QUIC_CRYPTO_INVALID_VALUE_LENGTH, "quic.crypto.invalid_value_length"}, |
145 { net::QUIC_CRYPTO_INVALID_VALUE_LENGTH, "quic.crypto.invalid_value_length" }, | 145 // A crypto message was received after the handshake was complete. |
146 // A crypto message was received after the handshake was complete. | 146 {net::QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, |
147 { net::QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, | 147 "quic.crypto_message_after_handshake_complete"}, |
148 "quic.crypto_message_after_handshake_complete" }, | 148 // A crypto message was received with an illegal message tag. |
149 // A crypto message was received with an illegal message tag. | 149 {net::QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "quic.invalid_crypto_message_type"}, |
150 { net::QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "quic.invalid_crypto_message_type" }, | 150 // A crypto message was received with an illegal parameter. |
151 // A crypto message was received with an illegal parameter. | 151 {net::QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER, |
152 { net::QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER, | 152 "quic.invalid_crypto_message_parameter"}, |
153 "quic.invalid_crypto_message_parameter" }, | 153 // An invalid channel id signature was supplied. |
154 // An invalid channel id signature was supplied. | 154 {net::QUIC_INVALID_CHANNEL_ID_SIGNATURE, |
155 { net::QUIC_INVALID_CHANNEL_ID_SIGNATURE, | 155 "quic.invalid_channel_id_signature"}, |
156 "quic.invalid_channel_id_signature" }, | 156 // A crypto message was received with a mandatory parameter missing. |
157 // A crypto message was received with a mandatory parameter missing. | 157 {net::QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND, |
158 { net::QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND, | 158 "quic.crypto_message.parameter_not_found"}, |
159 "quic.crypto_message.parameter_not_found" }, | 159 // A crypto message was received with a parameter that has no overlap |
160 // A crypto message was received with a parameter that has no overlap | 160 // with the local parameter. |
161 // with the local parameter. | 161 {net::QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP, |
162 { net::QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP, | 162 "quic.crypto_message.parameter_no_overlap"}, |
163 "quic.crypto_message.parameter_no_overlap" }, | 163 // A crypto message was received that contained a parameter with too few |
164 // A crypto message was received that contained a parameter with too few | 164 // values. |
165 // values. | 165 {net::QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND, |
166 { net::QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND, | 166 "quic_crypto_message_index_not_found"}, |
167 "quic_crypto_message_index_not_found" }, | 167 // A demand for an unsupport proof type was received. |
168 // A demand for an unsupport proof type was received. | 168 {net::QUIC_UNSUPPORTED_PROOF_DEMAND, "quic.unsupported_proof_demand"}, |
169 { net::QUIC_UNSUPPORTED_PROOF_DEMAND, "quic.unsupported_proof_demand" }, | 169 // An internal error occured in crypto processing. |
170 // An internal error occured in crypto processing. | 170 {net::QUIC_CRYPTO_INTERNAL_ERROR, "quic.crypto.internal_error"}, |
171 { net::QUIC_CRYPTO_INTERNAL_ERROR, "quic.crypto.internal_error" }, | 171 // A crypto handshake message specified an unsupported version. |
172 // A crypto handshake message specified an unsupported version. | 172 {net::QUIC_CRYPTO_VERSION_NOT_SUPPORTED, |
173 { net::QUIC_CRYPTO_VERSION_NOT_SUPPORTED, | 173 "quic.crypto.version_not_supported"}, |
174 "quic.crypto.version_not_supported" }, | 174 // A crypto handshake message resulted in a stateless reject. |
175 // A crypto handshake message resulted in a stateless reject. | 175 {net::QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT, |
176 { net::QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT, | 176 "quic.crypto.handshake_stateless_reject"}, |
177 "quic.crypto.handshake_stateless_reject" }, | 177 // There was no intersection between the crypto primitives supported by the |
178 // There was no intersection between the crypto primitives supported by the | 178 // peer and ourselves. |
179 // peer and ourselves. | 179 {net::QUIC_CRYPTO_NO_SUPPORT, "quic.crypto.no_support"}, |
180 { net::QUIC_CRYPTO_NO_SUPPORT, "quic.crypto.no_support" }, | 180 // The server rejected our client hello messages too many times. |
181 // The server rejected our client hello messages too many times. | 181 {net::QUIC_CRYPTO_TOO_MANY_REJECTS, "quic.crypto.too_many_rejects"}, |
182 { net::QUIC_CRYPTO_TOO_MANY_REJECTS, "quic.crypto.too_many_rejects" }, | 182 // The client rejected the server's certificate chain or signature. |
183 // The client rejected the server's certificate chain or signature. | 183 {net::QUIC_PROOF_INVALID, "quic.proof_invalid"}, |
184 { net::QUIC_PROOF_INVALID, "quic.proof_invalid" }, | 184 // A crypto message was received with a duplicate tag. |
185 // A crypto message was received with a duplicate tag. | 185 {net::QUIC_CRYPTO_DUPLICATE_TAG, "quic.crypto.duplicate_tag"}, |
186 { net::QUIC_CRYPTO_DUPLICATE_TAG, "quic.crypto.duplicate_tag" }, | 186 // A crypto message was received with the wrong encryption level (i.e. it |
187 // A crypto message was received with the wrong encryption level (i.e. it | 187 // should have been encrypted but was not.) |
188 // should have been encrypted but was not.) | 188 {net::QUIC_CRYPTO_ENCRYPTION_LEVEL_INCORRECT, |
189 { net::QUIC_CRYPTO_ENCRYPTION_LEVEL_INCORRECT, | 189 "quic.crypto.encryption_level_incorrect"}, |
190 "quic.crypto.encryption_level_incorrect" }, | 190 // The server config for a server has expired. |
191 // The server config for a server has expired. | 191 {net::QUIC_CRYPTO_SERVER_CONFIG_EXPIRED, |
192 { net::QUIC_CRYPTO_SERVER_CONFIG_EXPIRED, | 192 "quic.crypto.server_config_expired"}, |
193 "quic.crypto.server_config_expired" }, | 193 // We failed to setup the symmetric keys for a connection. |
194 // We failed to setup the symmetric keys for a connection. | 194 {net::QUIC_CRYPTO_SYMMETRIC_KEY_SETUP_FAILED, |
195 { net::QUIC_CRYPTO_SYMMETRIC_KEY_SETUP_FAILED, | 195 "quic.crypto.symmetric_key_setup_failed"}, |
196 "quic.crypto.symmetric_key_setup_failed" }, | 196 // A handshake message arrived, but we are still validating the |
197 // A handshake message arrived, but we are still validating the | 197 // previous handshake message. |
198 // previous handshake message. | 198 {net::QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO, |
199 { net::QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO, | 199 "quic.crypto_message_while_validating_client_hello"}, |
200 "quic.crypto_message_while_validating_client_hello" }, | 200 // A server config update arrived before the handshake is complete. |
201 // A server config update arrived before the handshake is complete. | 201 {net::QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE, |
202 { net::QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE, | 202 "quic.crypto.update_before_handshake_complete"}, |
203 "quic.crypto.update_before_handshake_complete" }, | 203 // CHLO cannot fit in one packet. |
204 // CHLO cannot fit in one packet. | 204 {net::QUIC_CRYPTO_CHLO_TOO_LARGE, "quic.crypto.chlo_too_large"}, |
205 { net::QUIC_CRYPTO_CHLO_TOO_LARGE, | 205 // This connection involved a version negotiation which appears to have been |
206 "quic.crypto.chlo_too_large" }, | 206 // tampered with. |
207 // This connection involved a version negotiation which appears to have been | 207 {net::QUIC_VERSION_NEGOTIATION_MISMATCH, |
208 // tampered with. | 208 "quic.version_negotiation_mismatch"}, |
209 { net::QUIC_VERSION_NEGOTIATION_MISMATCH, | 209 |
210 "quic.version_negotiation_mismatch" }, | 210 // Multipath is not enabled, but a packet with multipath flag on is |
211 | 211 // received. |
212 // Multipath is not enabled, but a packet with multipath flag on is received. | 212 {net::QUIC_BAD_MULTIPATH_FLAG, "quic.bad_multipath_flag"}, |
213 { net::QUIC_BAD_MULTIPATH_FLAG, "quic.bad_multipath_flag" }, | 213 // A path is supposed to exist but does not. |
214 // A path is supposed to exist but does not. | 214 {net::QUIC_MULTIPATH_PATH_DOES_NOT_EXIST, |
215 { net::QUIC_MULTIPATH_PATH_DOES_NOT_EXIST, | 215 "quic.quic_multipath_path_does_not_exist"}, |
216 "quic.quic_multipath_path_does_not_exist" }, | 216 // A path is supposed to be active but is not. |
217 // A path is supposed to be active but is not. | 217 {net::QUIC_MULTIPATH_PATH_NOT_ACTIVE, |
218 { net::QUIC_MULTIPATH_PATH_NOT_ACTIVE, | 218 "quic.quic_multipath_path_not_active"}, |
219 "quic.quic_multipath_path_not_active" }, | 219 |
220 | 220 // Network change and connection migration errors. |
221 // Network change and connection migration errors. | 221 |
222 | 222 // IP address changed causing connection close. |
223 // IP address changed causing connection close. | 223 {net::QUIC_IP_ADDRESS_CHANGED, "quic.ip_address_changed"}, |
224 { net::QUIC_IP_ADDRESS_CHANGED, "quic.ip_address_changed" }, | 224 // Network changed, but connection had no migratable streams. |
225 // Network changed, but connection had no migratable streams. | 225 {net::QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS, |
226 { net::QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS, | 226 "quic.connection_migration_no_migratable_streams"}, |
227 "quic.connection_migration_no_migratable_streams" }, | 227 // Connection changed networks too many times. |
228 // Connection changed networks too many times. | 228 {net::QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES, |
229 { net::QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES, | 229 "quic.connection_migration_too_many_changes"}, |
230 "quic.connection_migration_too_many_changes" }, | 230 // Connection migration was attempted, but there was no new network to |
231 // Connection migration was attempted, but there was no new network to | 231 // migrate to. |
232 // migrate to. | 232 {net::QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK, |
233 { net::QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK, | 233 "quic.connection_migration_no_new_network"}, |
234 "quic.connection_migration_no_new_network" }, | 234 // Network changed, but connection had one or more non-migratable streams. |
235 // Network changed, but connection had one or more non-migratable streams. | 235 {net::QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM, |
236 { net::QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM, | 236 "quic.connection_migration_non_migratable_stream"}, |
237 "quic.connection_migration_non_migratable_stream" }, | 237 // Stream frame overlaps with buffered data. |
238 // Stream frame overlaps with buffered data. | 238 {net::QUIC_OVERLAPPING_STREAM_DATA, "quic.overlapping_stream_data"}, |
239 { net::QUIC_OVERLAPPING_STREAM_DATA, | 239 // Stream frames arrived too discontiguously so that stream sequencer buffer |
240 "quic.overlapping_stream_data" }, | 240 // has too many gaps. |
241 // Stream frames arrived too discontiguously so that stream sequencer buffer | 241 {net::QUIC_TOO_MANY_FRAME_GAPS, "quic.too_many_frame_gaps"}, |
242 // has too many gaps. | 242 // Sequencer buffer get into weird state where continuing read/write |
243 { net::QUIC_TOO_MANY_FRAME_GAPS, | 243 // will lead to crash. |
244 "quic.too_many_frame_gaps" }, | 244 {net::QUIC_STREAM_SEQUENCER_INVALID_STATE, |
245 // Sequencer buffer get into weird state where continuing read/write | 245 "quic.stream_sequencer_invalid_state"}, |
246 // will lead to crash. | 246 // Connection closed because of server hits max number of sessions allowed. |
247 { net::QUIC_STREAM_SEQUENCER_INVALID_STATE, | 247 {net::QUIC_TOO_MANY_SESSIONS_ON_SERVER, "quic.too_many_sessions_on_server"}, |
248 "quic.stream_sequencer_invalid_state" }, | 248 // There was an error decompressing data. |
249 // Connection closed because of server hits max number of sessions allowed. | 249 {net::QUIC_DECOMPRESSION_FAILURE, "quic.decompression_failure"}, |
250 { net::QUIC_TOO_MANY_SESSIONS_ON_SERVER, | 250 |
251 "quic.too_many_sessions_on_server" }, | 251 // No error. Used as bound while iterating. |
252 | 252 {net::QUIC_LAST_ERROR, "quic.last_error"}}; |
253 // No error. Used as bound while iterating. | |
254 { net::QUIC_LAST_ERROR, "quic.last_error"} | |
255 }; | |
256 | 253 |
257 // Must be updated any time a net::QuicErrorCode is deprecated in | 254 // Must be updated any time a net::QuicErrorCode is deprecated in |
258 // net/quic/core/quic_packets.h. | 255 // net/quic/core/quic_packets.h. |
259 const int kDeprecatedQuicErrorCount = 4; | 256 const int kDeprecatedQuicErrorCount = 4; |
260 const int kActiveQuicErrorCount = | 257 const int kActiveQuicErrorCount = |
261 net::QUIC_LAST_ERROR - kDeprecatedQuicErrorCount; | 258 net::QUIC_LAST_ERROR - kDeprecatedQuicErrorCount; |
262 | 259 |
263 static_assert(arraysize(kQuicErrorMap) == kActiveQuicErrorCount, | 260 static_assert(arraysize(kQuicErrorMap) == kActiveQuicErrorCount, |
264 "quic_error_map is not in sync with quic protocol!"); | 261 "quic_error_map is not in sync with quic protocol!"); |
265 | 262 |
(...skipping 10 matching lines...) Expand all Loading... |
276 *beacon_quic_error_out = kQuicErrorMap[i].beacon_quic_error; | 273 *beacon_quic_error_out = kQuicErrorMap[i].beacon_quic_error; |
277 return true; | 274 return true; |
278 } | 275 } |
279 } | 276 } |
280 } | 277 } |
281 beacon_quic_error_out->clear(); | 278 beacon_quic_error_out->clear(); |
282 return false; | 279 return false; |
283 } | 280 } |
284 | 281 |
285 } // namespace domain_reliability | 282 } // namespace domain_reliability |
OLD | NEW |