Merge pull request #108741 from lukegb/envoy

envoy: init at 1.16.2

authored by adisbladis and committed by GitHub 6dfd1a27 e286885b

+3195 -1
+3 -1
pkgs/build-support/build-bazel-package/default.nix
··· 172 172 173 173 chmod -R +w $bazelOut 174 174 find $bazelOut -type l | while read symlink; do 175 - ln -sf $(readlink "$symlink" | sed "s,NIX_BUILD_TOP,$NIX_BUILD_TOP,") "$symlink" 175 + if [[ $(readlink "$symlink") == *NIX_BUILD_TOP* ]]; then 176 + ln -sf $(readlink "$symlink" | sed "s,NIX_BUILD_TOP,$NIX_BUILD_TOP,") "$symlink" 177 + fi 176 178 done 177 179 '' + fBuildAttrs.preConfigure or ""; 178 180
+2980
pkgs/servers/http/envoy/0001-quiche-update-QUICHE-tar-13949.patch
··· 1 + From 97d7c456e03d4a11157fac17c7b8cbcee1d8a657 Mon Sep 17 00:00:00 2001 2 + From: danzh <danzh2010@users.noreply.github.com> 3 + Date: Mon, 16 Nov 2020 14:27:13 -0500 4 + Subject: [PATCH] quiche: update QUICHE tar (#13949) 5 + 6 + Signed-off-by: Dan Zhang <danzh@google.com> 7 + --- 8 + bazel/envoy_internal.bzl | 2 + 9 + bazel/external/quiche.BUILD | 85 +-- 10 + bazel/repository_locations.bzl | 6 +- 11 + source/extensions/quic_listeners/quiche/BUILD | 1 + 12 + .../quiche/active_quic_listener.cc | 2 +- 13 + .../quiche/envoy_quic_client_connection.cc | 2 +- 14 + .../quiche/envoy_quic_client_stream.cc | 1 + 15 + .../quiche/envoy_quic_connection.cc | 6 +- 16 + .../quiche/envoy_quic_connection.h | 1 + 17 + .../quiche/envoy_quic_dispatcher.cc | 6 +- 18 + .../quiche/envoy_quic_dispatcher.h | 2 +- 19 + .../quiche/envoy_quic_proof_source.cc | 2 +- 20 + .../quiche/envoy_quic_proof_source.h | 2 +- 21 + .../quiche/envoy_quic_proof_source_base.cc | 7 +- 22 + .../quiche/envoy_quic_proof_source_base.h | 6 +- 23 + .../quiche/envoy_quic_proof_verifier_base.cc | 4 +- 24 + .../quiche/envoy_quic_server_connection.cc | 10 +- 25 + .../quiche/envoy_quic_server_connection.h | 1 + 26 + .../quic_listeners/quiche/platform/BUILD | 42 +- 27 + .../quiche/platform/flags_impl.cc | 108 +++- 28 + .../quiche/platform/flags_impl.h | 46 +- 29 + .../quiche/platform/flags_list.h | 502 ------------------ 30 + .../quiche/platform/http2_flags_impl.h | 4 +- 31 + .../quiche/platform/quic_aligned_impl.h | 18 - 32 + .../quiche/platform/quic_cert_utils_impl.cc | 38 +- 33 + .../quiche/platform/quic_cert_utils_impl.h | 9 +- 34 + .../quiche/platform/quic_fallthrough_impl.h | 11 - 35 + .../quiche/platform/quic_file_utils_impl.cc | 4 +- 36 + .../quiche/platform/quic_file_utils_impl.h | 6 +- 37 + .../quiche/platform/quic_flags_impl.h | 6 +- 38 + .../platform/quic_hostname_utils_impl.cc | 6 +- 39 + .../platform/quic_hostname_utils_impl.h | 8 +- 40 + .../quiche/platform/quic_macros_impl.h | 13 - 41 + .../platform/quic_mem_slice_span_impl.cc | 3 +- 42 + .../platform/quic_mem_slice_span_impl.h | 9 +- 43 + ..._ptr_util_impl.h => quic_testvalue_impl.h} | 11 +- 44 + .../platform/quic_udp_socket_platform_impl.h | 3 + 45 + .../quiche/platform/quiche_arraysize_impl.h | 11 - 46 + .../quiche/platform/quiche_optional_impl.h | 17 - 47 + .../quiche/platform/quiche_text_utils_impl.h | 63 +-- 48 + .../quiche/platform/quiche_time_utils_impl.cc | 4 +- 49 + .../quiche/platform/quiche_time_utils_impl.h | 4 +- 50 + .../platform/spdy_endianness_util_impl.h | 29 - 51 + .../quiche/platform/spdy_flags_impl.h | 4 +- 52 + .../quiche/platform/spdy_string_utils_impl.h | 2 +- 53 + .../spdy_server_push_utils_for_envoy.cc | 10 +- 54 + .../quiche/envoy_quic_client_session_test.cc | 2 +- 55 + .../quiche/envoy_quic_client_stream_test.cc | 44 +- 56 + .../quiche/envoy_quic_proof_source_test.cc | 6 +- 57 + .../quiche/envoy_quic_proof_verifier_test.cc | 8 +- 58 + .../quiche/envoy_quic_server_session_test.cc | 3 +- 59 + .../quiche/envoy_quic_server_stream_test.cc | 53 +- 60 + .../quic_listeners/quiche/platform/BUILD | 22 - 61 + .../quiche/platform/http2_platform_test.cc | 22 +- 62 + .../quiche/platform/quic_platform_test.cc | 61 +-- 63 + .../quiche/platform/quic_test_output_impl.cc | 15 +- 64 + .../quiche/platform/quic_test_output_impl.h | 12 +- 65 + .../quiche/platform/quiche_platform_test.cc | 39 -- 66 + .../quiche/platform/spdy_platform_test.cc | 20 +- 67 + .../quic_listeners/quiche/test_proof_source.h | 2 +- 68 + .../quic_listeners/quiche/test_utils.h | 4 +- 69 + 61 files changed, 396 insertions(+), 1054 deletions(-) 70 + delete mode 100644 source/extensions/quic_listeners/quiche/platform/flags_list.h 71 + delete mode 100644 source/extensions/quic_listeners/quiche/platform/quic_aligned_impl.h 72 + delete mode 100644 source/extensions/quic_listeners/quiche/platform/quic_fallthrough_impl.h 73 + delete mode 100644 source/extensions/quic_listeners/quiche/platform/quic_macros_impl.h 74 + rename source/extensions/quic_listeners/quiche/platform/{quiche_ptr_util_impl.h => quic_testvalue_impl.h} (52%) 75 + delete mode 100644 source/extensions/quic_listeners/quiche/platform/quiche_arraysize_impl.h 76 + delete mode 100644 source/extensions/quic_listeners/quiche/platform/quiche_optional_impl.h 77 + delete mode 100644 source/extensions/quic_listeners/quiche/platform/spdy_endianness_util_impl.h 78 + delete mode 100644 test/extensions/quic_listeners/quiche/platform/quiche_platform_test.cc 79 + 80 + diff --git a/bazel/envoy_internal.bzl b/bazel/envoy_internal.bzl 81 + index 5ad86609a..3f9ddfd23 100644 82 + --- a/bazel/envoy_internal.bzl 83 + +++ b/bazel/envoy_internal.bzl 84 + @@ -54,6 +54,8 @@ def envoy_copts(repository, test = False): 85 + }) + select({ 86 + repository + "//bazel:clang_build": ["-fno-limit-debug-info", "-Wgnu-conditional-omitted-operand", "-Wc++2a-extensions", "-Wrange-loop-analysis"], 87 + repository + "//bazel:gcc_build": ["-Wno-maybe-uninitialized"], 88 + + # TODO: Replace with /Zc:preprocessor for cl.exe versions >= 16.5 89 + + repository + "//bazel:windows_x86_64": ["-experimental:preprocessor", "-Wv:19.4"], 90 + "//conditions:default": [], 91 + }) + select({ 92 + repository + "//bazel:no_debug_info": ["-g0"], 93 + diff --git a/bazel/external/quiche.BUILD b/bazel/external/quiche.BUILD 94 + index 7541909aa..b6b208fc5 100644 95 + --- a/bazel/external/quiche.BUILD 96 + +++ b/bazel/external/quiche.BUILD 97 + @@ -57,16 +57,12 @@ quiche_common_copts = [ 98 + "-Wno-unused-function", 99 + # quic_inlined_frame.h uses offsetof() to optimize memory usage in frames. 100 + "-Wno-invalid-offsetof", 101 + - "-Wno-range-loop-analysis", 102 + ] 103 + 104 + quiche_copts = select({ 105 + # Ignore unguarded #pragma GCC statements in QUICHE sources 106 + "@envoy//bazel:windows_x86_64": ["-wd4068"], 107 + # Remove these after upstream fix. 108 + - "@envoy//bazel:gcc_build": [ 109 + - "-Wno-sign-compare", 110 + - ] + quiche_common_copts, 111 + "//conditions:default": quiche_common_copts, 112 + }) 113 + 114 + @@ -737,7 +733,6 @@ envoy_cc_library( 115 + hdrs = [ 116 + "quiche/spdy/platform/api/spdy_bug_tracker.h", 117 + "quiche/spdy/platform/api/spdy_containers.h", 118 + - "quiche/spdy/platform/api/spdy_endianness_util.h", 119 + "quiche/spdy/platform/api/spdy_estimate_memory_usage.h", 120 + "quiche/spdy/platform/api/spdy_flags.h", 121 + "quiche/spdy/platform/api/spdy_logging.h", 122 + @@ -935,6 +930,7 @@ envoy_cc_library( 123 + copts = quiche_copts, 124 + repository = "@envoy", 125 + deps = [ 126 + + ":http2_hpack_huffman_hpack_huffman_encoder_lib", 127 + ":spdy_core_protocol_lib", 128 + ":spdy_platform", 129 + ], 130 + @@ -1049,19 +1045,16 @@ envoy_cc_library( 131 + envoy_cc_library( 132 + name = "quic_platform_base", 133 + hdrs = [ 134 + - "quiche/quic/platform/api/quic_aligned.h", 135 + "quiche/quic/platform/api/quic_bug_tracker.h", 136 + "quiche/quic/platform/api/quic_client_stats.h", 137 + "quiche/quic/platform/api/quic_containers.h", 138 + "quiche/quic/platform/api/quic_error_code_wrappers.h", 139 + "quiche/quic/platform/api/quic_estimate_memory_usage.h", 140 + "quiche/quic/platform/api/quic_exported_stats.h", 141 + - "quiche/quic/platform/api/quic_fallthrough.h", 142 + "quiche/quic/platform/api/quic_flag_utils.h", 143 + "quiche/quic/platform/api/quic_flags.h", 144 + "quiche/quic/platform/api/quic_iovec.h", 145 + "quiche/quic/platform/api/quic_logging.h", 146 + - "quiche/quic/platform/api/quic_macros.h", 147 + "quiche/quic/platform/api/quic_map_util.h", 148 + "quiche/quic/platform/api/quic_mem_slice.h", 149 + "quiche/quic/platform/api/quic_prefetch.h", 150 + @@ -1072,6 +1065,7 @@ envoy_cc_library( 151 + "quiche/quic/platform/api/quic_stream_buffer_allocator.h", 152 + "quiche/quic/platform/api/quic_string_utils.h", 153 + "quiche/quic/platform/api/quic_uint128.h", 154 + + "quiche/quic/platform/api/quic_testvalue.h", 155 + # TODO: uncomment the following files as implementations are added. 156 + # "quiche/quic/platform/api/quic_fuzzed_data_provider.h", 157 + # "quiche/quic/platform/api/quic_test_loopback.h", 158 + @@ -1147,7 +1141,6 @@ envoy_cc_test_library( 159 + hdrs = ["quiche/quic/platform/api/quic_port_utils.h"], 160 + repository = "@envoy", 161 + tags = ["nofips"], 162 + - deps = ["@envoy//test/extensions/quic_listeners/quiche/platform:quic_platform_port_utils_impl_lib"], 163 + ) 164 + 165 + envoy_cc_library( 166 + @@ -1216,15 +1209,14 @@ envoy_cc_test_library( 167 + ) 168 + 169 + envoy_cc_library( 170 + - name = "quiche_common_platform_endian", 171 + - hdrs = ["quiche/common/platform/api/quiche_endian.h"], 172 + + name = "quiche_common_endian_lib", 173 + + hdrs = ["quiche/common/quiche_endian.h"], 174 + repository = "@envoy", 175 + tags = ["nofips"], 176 + visibility = ["//visibility:public"], 177 + deps = 178 + [ 179 + ":quiche_common_platform_export", 180 + - "@envoy//source/extensions/quic_listeners/quiche/platform:quiche_common_platform_endian_impl_lib", 181 + ], 182 + ) 183 + 184 + @@ -1932,6 +1924,7 @@ envoy_cc_library( 185 + visibility = ["//visibility:public"], 186 + deps = [ 187 + ":quic_core_clock_lib", 188 + + ":quic_core_crypto_certificate_view_lib", 189 + ":quic_core_crypto_encryption_lib", 190 + ":quic_core_crypto_hkdf_lib", 191 + ":quic_core_crypto_proof_source_interface_lib", 192 + @@ -2167,6 +2160,15 @@ envoy_cc_library( 193 + ], 194 + ) 195 + 196 + +envoy_cc_library( 197 + + name = "quic_core_flags_list_lib", 198 + + hdrs = ["quiche/quic/core/quic_flags_list.h"], 199 + + copts = quiche_copts, 200 + + repository = "@envoy", 201 + + tags = ["nofips"], 202 + + visibility = ["//visibility:public"], 203 + +) 204 + + 205 + envoy_cc_library( 206 + name = "quic_core_framer_lib", 207 + srcs = ["quiche/quic/core/quic_framer.cc"], 208 + @@ -2339,6 +2341,7 @@ envoy_cc_library( 209 + repository = "@envoy", 210 + tags = ["nofips"], 211 + deps = [ 212 + + ":http2_constants_lib", 213 + ":quic_core_data_lib", 214 + ":quic_core_error_codes_lib", 215 + ":quic_core_http_http_frames_lib", 216 + @@ -2723,6 +2726,27 @@ envoy_cc_library( 217 + ], 218 + ) 219 + 220 + +envoy_cc_library( 221 + + name = "quic_core_path_validator_lib", 222 + + srcs = ["quiche/quic/core/quic_path_validator.cc"], 223 + + hdrs = ["quiche/quic/core/quic_path_validator.h"], 224 + + copts = quiche_copts, 225 + + repository = "@envoy", 226 + + tags = ["nofips"], 227 + + deps = [ 228 + + ":quic_core_alarm_factory_interface_lib", 229 + + ":quic_core_alarm_interface_lib", 230 + + ":quic_core_arena_scoped_ptr_lib", 231 + + ":quic_core_clock_lib", 232 + + ":quic_core_constants_lib", 233 + + ":quic_core_crypto_random_lib", 234 + + ":quic_core_one_block_arena_lib", 235 + + ":quic_core_packet_writer_interface_lib", 236 + + ":quic_core_types_lib", 237 + + ":quic_platform", 238 + + ], 239 + +) 240 + + 241 + envoy_cc_library( 242 + name = "quic_core_process_packet_interface_lib", 243 + hdrs = ["quiche/quic/core/quic_process_packet_interface.h"], 244 + @@ -2735,6 +2759,15 @@ envoy_cc_library( 245 + ], 246 + ) 247 + 248 + +envoy_cc_library( 249 + + name = "quic_core_protocol_flags_list_lib", 250 + + hdrs = ["quiche/quic/core/quic_protocol_flags_list.h"], 251 + + copts = quiche_copts, 252 + + repository = "@envoy", 253 + + tags = ["nofips"], 254 + + visibility = ["//visibility:public"], 255 + +) 256 + + 257 + envoy_cc_library( 258 + name = "quic_core_qpack_blocking_manager_lib", 259 + srcs = ["quiche/quic/core/qpack/qpack_blocking_manager.cc"], 260 + @@ -2896,6 +2929,7 @@ envoy_cc_library( 261 + deps = [ 262 + ":http2_decoder_decode_buffer_lib", 263 + ":http2_decoder_decode_status_lib", 264 + + ":quic_core_error_codes_lib", 265 + ":quic_core_qpack_qpack_instruction_decoder_lib", 266 + ":quic_core_qpack_qpack_instructions_lib", 267 + ":quic_core_qpack_qpack_stream_receiver_lib", 268 + @@ -3368,7 +3402,7 @@ envoy_cc_library( 269 + ":quic_core_error_codes_lib", 270 + ":quic_core_time_lib", 271 + ":quic_platform_base", 272 + - ":quiche_common_platform_endian", 273 + + ":quiche_common_endian_lib", 274 + ], 275 + ) 276 + 277 + @@ -3420,6 +3454,7 @@ envoy_cc_library( 278 + repository = "@envoy", 279 + tags = ["nofips"], 280 + deps = [ 281 + + ":quic_core_circular_deque_lib", 282 + ":quic_core_connection_stats_lib", 283 + ":quic_core_packets_lib", 284 + ":quic_core_session_notifier_interface_lib", 285 + @@ -3459,6 +3494,7 @@ envoy_cc_library( 286 + deps = [ 287 + ":quic_core_versions_lib", 288 + ":quic_platform_base", 289 + + ":quiche_common_endian_lib", 290 + ], 291 + ) 292 + 293 + @@ -3475,7 +3511,6 @@ envoy_cc_library( 294 + ":quic_core_tag_lib", 295 + ":quic_core_types_lib", 296 + ":quic_platform_base", 297 + - ":quiche_common_platform_endian", 298 + ], 299 + ) 300 + 301 + @@ -3746,6 +3781,7 @@ envoy_cc_test_library( 302 + ":quic_core_packet_creator_lib", 303 + ":quic_core_packet_writer_interface_lib", 304 + ":quic_core_packets_lib", 305 + + ":quic_core_path_validator_lib", 306 + ":quic_core_received_packet_manager_lib", 307 + ":quic_core_sent_packet_manager_lib", 308 + ":quic_core_server_id_lib", 309 + @@ -3836,25 +3872,10 @@ envoy_cc_test_library( 310 + deps = [":epoll_server_platform"], 311 + ) 312 + 313 + -envoy_cc_library( 314 + - name = "quiche_common_platform_optional", 315 + - hdrs = ["quiche/common/platform/api/quiche_optional.h"], 316 + - repository = "@envoy", 317 + - tags = ["nofips"], 318 + - visibility = ["//visibility:public"], 319 + - deps = [ 320 + - ":quiche_common_platform_export", 321 + - "@envoy//source/extensions/quic_listeners/quiche/platform:quiche_common_platform_optional_impl_lib", 322 + - ], 323 + -) 324 + - 325 + envoy_cc_library( 326 + name = "quiche_common_platform", 327 + hdrs = [ 328 + - "quiche/common/platform/api/quiche_arraysize.h", 329 + "quiche/common/platform/api/quiche_logging.h", 330 + - "quiche/common/platform/api/quiche_optional.h", 331 + - "quiche/common/platform/api/quiche_ptr_util.h", 332 + "quiche/common/platform/api/quiche_str_cat.h", 333 + "quiche/common/platform/api/quiche_string_piece.h", 334 + "quiche/common/platform/api/quiche_text_utils.h", 335 + @@ -3866,7 +3887,6 @@ envoy_cc_library( 336 + visibility = ["//visibility:public"], 337 + deps = [ 338 + ":quiche_common_platform_export", 339 + - ":quiche_common_platform_optional", 340 + "@envoy//source/extensions/quic_listeners/quiche/platform:quiche_common_platform_impl_lib", 341 + ], 342 + ) 343 + @@ -3874,7 +3894,6 @@ envoy_cc_library( 344 + envoy_cc_test_library( 345 + name = "quiche_common_platform_test", 346 + srcs = [ 347 + - "quiche/common/platform/api/quiche_endian_test.cc", 348 + "quiche/common/platform/api/quiche_str_cat_test.cc", 349 + "quiche/common/platform/api/quiche_text_utils_test.cc", 350 + "quiche/common/platform/api/quiche_time_utils_test.cc", 351 + @@ -3884,7 +3903,6 @@ envoy_cc_test_library( 352 + tags = ["nofips"], 353 + deps = [ 354 + ":quiche_common_platform", 355 + - ":quiche_common_platform_endian", 356 + "@envoy//test/extensions/quic_listeners/quiche/platform:quiche_common_platform_test_impl_lib", 357 + ], 358 + ) 359 + @@ -3904,8 +3922,8 @@ envoy_cc_library( 360 + tags = ["nofips"], 361 + visibility = ["//visibility:public"], 362 + deps = [ 363 + + ":quiche_common_endian_lib", 364 + ":quiche_common_platform", 365 + - ":quiche_common_platform_endian", 366 + ], 367 + ) 368 + 369 + @@ -3944,6 +3962,7 @@ envoy_cc_test( 370 + deps = [ 371 + ":http2_platform", 372 + ":http2_test_tools_random", 373 + + ":quiche_common_test_tools_test_utils_lib", 374 + ], 375 + ) 376 + 377 + diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl 378 + index 6eba5a821..19ddc76e8 100644 379 + --- a/bazel/repository_locations.bzl 380 + +++ b/bazel/repository_locations.bzl 381 + @@ -671,9 +671,9 @@ DEPENDENCY_REPOSITORIES_SPEC = dict( 382 + project_name = "QUICHE", 383 + project_desc = "QUICHE (QUIC, HTTP/2, Etc) is Google‘s implementation of QUIC and related protocols", 384 + project_url = "https://quiche.googlesource.com/quiche", 385 + - # Static snapshot of https://quiche.googlesource.com/quiche/+archive/f555d99a084cdd086a349548c70fb558ac5847cf.tar.gz 386 + - version = "f555d99a084cdd086a349548c70fb558ac5847cf", 387 + - sha256 = "1833f08e7b0f18b49d7498b029b7f3e6559a82113ec82a98a9e945553756e351", 388 + + # Static snapshot of https://quiche.googlesource.com/quiche/+archive/ecc28c0d7428f3323ea26eb1ddb98a5e06b23dea.tar.gz 389 + + version = "ecc28c0d7428f3323ea26eb1ddb98a5e06b23dea", 390 + + sha256 = "52680dea984dbe899c27176155578b97276e1f1516b7c3a63fb16ba593061859", 391 + urls = ["https://storage.googleapis.com/quiche-envoy-integration/{version}.tar.gz"], 392 + use_category = ["dataplane_ext"], 393 + extensions = ["envoy.transport_sockets.quic"], 394 + diff --git a/source/extensions/quic_listeners/quiche/BUILD b/source/extensions/quic_listeners/quiche/BUILD 395 + index 29eb78d15..a90cfde6d 100644 396 + --- a/source/extensions/quic_listeners/quiche/BUILD 397 + +++ b/source/extensions/quic_listeners/quiche/BUILD 398 + @@ -212,6 +212,7 @@ envoy_cc_library( 399 + "//source/common/buffer:buffer_lib", 400 + "//source/common/common:assert_lib", 401 + "//source/common/http:header_map_lib", 402 + + "//source/common/http:header_utility_lib", 403 + "//source/extensions/quic_listeners/quiche/platform:quic_platform_mem_slice_storage_impl_lib", 404 + "@com_googlesource_quiche//:quic_core_http_client_lib", 405 + ], 406 + diff --git a/source/extensions/quic_listeners/quiche/active_quic_listener.cc b/source/extensions/quic_listeners/quiche/active_quic_listener.cc 407 + index f4808adc5..86912292a 100644 408 + --- a/source/extensions/quic_listeners/quiche/active_quic_listener.cc 409 + +++ b/source/extensions/quic_listeners/quiche/active_quic_listener.cc 410 + @@ -55,7 +55,7 @@ ActiveQuicListener::ActiveQuicListener( 411 + quic::QuicRandom* const random = quic::QuicRandom::GetInstance(); 412 + random->RandBytes(random_seed_, sizeof(random_seed_)); 413 + crypto_config_ = std::make_unique<quic::QuicCryptoServerConfig>( 414 + - quiche::QuicheStringPiece(reinterpret_cast<char*>(random_seed_), sizeof(random_seed_)), 415 + + absl::string_view(reinterpret_cast<char*>(random_seed_), sizeof(random_seed_)), 416 + quic::QuicRandom::GetInstance(), 417 + std::make_unique<EnvoyQuicProofSource>(listen_socket_, listener_config.filterChainManager(), 418 + stats_), 419 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_client_connection.cc b/source/extensions/quic_listeners/quiche/envoy_quic_client_connection.cc 420 + index e79b08ad9..95d63729d 100644 421 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_client_connection.cc 422 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_client_connection.cc 423 + @@ -43,7 +43,7 @@ EnvoyQuicClientConnection::EnvoyQuicClientConnection( 424 + const quic::ParsedQuicVersionVector& supported_versions, Event::Dispatcher& dispatcher, 425 + Network::ConnectionSocketPtr&& connection_socket) 426 + : EnvoyQuicConnection( 427 + - server_connection_id, 428 + + server_connection_id, quic::QuicSocketAddress(), 429 + envoyIpAddressToQuicSocketAddress(connection_socket->remoteAddress()->ip()), helper, 430 + alarm_factory, writer, owns_writer, quic::Perspective::IS_CLIENT, supported_versions, 431 + std::move(connection_socket)), 432 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_client_stream.cc b/source/extensions/quic_listeners/quiche/envoy_quic_client_stream.cc 433 + index 866e35416..a759b26b1 100644 434 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_client_stream.cc 435 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_client_stream.cc 436 + @@ -20,6 +20,7 @@ 437 + 438 + #include "common/buffer/buffer_impl.h" 439 + #include "common/http/header_map_impl.h" 440 + +#include "common/http/header_utility.h" 441 + #include "common/common/assert.h" 442 + 443 + namespace Envoy { 444 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_connection.cc b/source/extensions/quic_listeners/quiche/envoy_quic_connection.cc 445 + index dcc311a6e..d813dfe4b 100644 446 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_connection.cc 447 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_connection.cc 448 + @@ -6,6 +6,7 @@ namespace Envoy { 449 + namespace Quic { 450 + 451 + EnvoyQuicConnection::EnvoyQuicConnection(const quic::QuicConnectionId& server_connection_id, 452 + + quic::QuicSocketAddress initial_self_address, 453 + quic::QuicSocketAddress initial_peer_address, 454 + quic::QuicConnectionHelperInterface& helper, 455 + quic::QuicAlarmFactory& alarm_factory, 456 + @@ -13,8 +14,9 @@ EnvoyQuicConnection::EnvoyQuicConnection(const quic::QuicConnectionId& server_co 457 + quic::Perspective perspective, 458 + const quic::ParsedQuicVersionVector& supported_versions, 459 + Network::ConnectionSocketPtr&& connection_socket) 460 + - : quic::QuicConnection(server_connection_id, initial_peer_address, &helper, &alarm_factory, 461 + - writer, owns_writer, perspective, supported_versions), 462 + + : quic::QuicConnection(server_connection_id, initial_self_address, initial_peer_address, 463 + + &helper, &alarm_factory, writer, owns_writer, perspective, 464 + + supported_versions), 465 + connection_socket_(std::move(connection_socket)) {} 466 + 467 + EnvoyQuicConnection::~EnvoyQuicConnection() { connection_socket_->close(); } 468 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_connection.h b/source/extensions/quic_listeners/quiche/envoy_quic_connection.h 469 + index f4c8589d7..f8543bc93 100644 470 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_connection.h 471 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_connection.h 472 + @@ -26,6 +26,7 @@ class EnvoyQuicConnection : public quic::QuicConnection, 473 + protected Logger::Loggable<Logger::Id::connection> { 474 + public: 475 + EnvoyQuicConnection(const quic::QuicConnectionId& server_connection_id, 476 + + quic::QuicSocketAddress initial_self_address, 477 + quic::QuicSocketAddress initial_peer_address, 478 + quic::QuicConnectionHelperInterface& helper, 479 + quic::QuicAlarmFactory& alarm_factory, quic::QuicPacketWriter* writer, 480 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_dispatcher.cc b/source/extensions/quic_listeners/quiche/envoy_quic_dispatcher.cc 481 + index ba8f7f3a8..e6351f643 100644 482 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_dispatcher.cc 483 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_dispatcher.cc 484 + @@ -48,11 +48,11 @@ void EnvoyQuicDispatcher::OnConnectionClosed(quic::QuicConnectionId connection_i 485 + } 486 + 487 + std::unique_ptr<quic::QuicSession> EnvoyQuicDispatcher::CreateQuicSession( 488 + - quic::QuicConnectionId server_connection_id, const quic::QuicSocketAddress& /*self_address*/, 489 + - const quic::QuicSocketAddress& peer_address, quiche::QuicheStringPiece /*alpn*/, 490 + + quic::QuicConnectionId server_connection_id, const quic::QuicSocketAddress& self_address, 491 + + const quic::QuicSocketAddress& peer_address, absl::string_view /*alpn*/, 492 + const quic::ParsedQuicVersion& version) { 493 + auto quic_connection = std::make_unique<EnvoyQuicServerConnection>( 494 + - server_connection_id, peer_address, *helper(), *alarm_factory(), writer(), 495 + + server_connection_id, self_address, peer_address, *helper(), *alarm_factory(), writer(), 496 + /*owns_writer=*/false, quic::ParsedQuicVersionVector{version}, listen_socket_); 497 + auto quic_session = std::make_unique<EnvoyQuicServerSession>( 498 + config(), quic::ParsedQuicVersionVector{version}, std::move(quic_connection), this, 499 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_dispatcher.h b/source/extensions/quic_listeners/quiche/envoy_quic_dispatcher.h 500 + index 589ff5327..d59307f41 100644 501 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_dispatcher.h 502 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_dispatcher.h 503 + @@ -62,7 +62,7 @@ protected: 504 + std::unique_ptr<quic::QuicSession> 505 + CreateQuicSession(quic::QuicConnectionId server_connection_id, 506 + const quic::QuicSocketAddress& self_address, 507 + - const quic::QuicSocketAddress& peer_address, quiche::QuicheStringPiece alpn, 508 + + const quic::QuicSocketAddress& peer_address, absl::string_view alpn, 509 + const quic::ParsedQuicVersion& version) override; 510 + 511 + private: 512 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_proof_source.cc b/source/extensions/quic_listeners/quiche/envoy_quic_proof_source.cc 513 + index 1f65e4e7e..967765829 100644 514 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_proof_source.cc 515 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_proof_source.cc 516 + @@ -36,7 +36,7 @@ EnvoyQuicProofSource::GetCertChain(const quic::QuicSocketAddress& server_address 517 + 518 + void EnvoyQuicProofSource::signPayload( 519 + const quic::QuicSocketAddress& server_address, const quic::QuicSocketAddress& client_address, 520 + - const std::string& hostname, uint16_t signature_algorithm, quiche::QuicheStringPiece in, 521 + + const std::string& hostname, uint16_t signature_algorithm, absl::string_view in, 522 + std::unique_ptr<quic::ProofSource::SignatureCallback> callback) { 523 + CertConfigWithFilterChain res = 524 + getTlsCertConfigAndFilterChain(server_address, client_address, hostname); 525 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_proof_source.h b/source/extensions/quic_listeners/quiche/envoy_quic_proof_source.h 526 + index 6e1c74c92..e22bf3465 100644 527 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_proof_source.h 528 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_proof_source.h 529 + @@ -28,7 +28,7 @@ protected: 530 + // quic::ProofSource 531 + void signPayload(const quic::QuicSocketAddress& server_address, 532 + const quic::QuicSocketAddress& client_address, const std::string& hostname, 533 + - uint16_t signature_algorithm, quiche::QuicheStringPiece in, 534 + + uint16_t signature_algorithm, absl::string_view in, 535 + std::unique_ptr<quic::ProofSource::SignatureCallback> callback) override; 536 + 537 + private: 538 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_proof_source_base.cc b/source/extensions/quic_listeners/quiche/envoy_quic_proof_source_base.cc 539 + index 2c82c04d9..9ad3cb07f 100644 540 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_proof_source_base.cc 541 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_proof_source_base.cc 542 + @@ -21,7 +21,7 @@ void EnvoyQuicProofSourceBase::GetProof(const quic::QuicSocketAddress& server_ad 543 + const std::string& hostname, 544 + const std::string& server_config, 545 + quic::QuicTransportVersion /*transport_version*/, 546 + - quiche::QuicheStringPiece chlo_hash, 547 + + absl::string_view chlo_hash, 548 + std::unique_ptr<quic::ProofSource::Callback> callback) { 549 + quic::QuicReferenceCountedPointer<quic::ProofSource::Chain> chain = 550 + GetCertChain(server_address, client_address, hostname); 551 + @@ -68,13 +68,12 @@ void EnvoyQuicProofSourceBase::GetProof(const quic::QuicSocketAddress& server_ad 552 + auto signature_callback = std::make_unique<SignatureCallback>(std::move(callback), chain); 553 + 554 + signPayload(server_address, client_address, hostname, sign_alg, 555 + - quiche::QuicheStringPiece(payload.get(), payload_size), 556 + - std::move(signature_callback)); 557 + + absl::string_view(payload.get(), payload_size), std::move(signature_callback)); 558 + } 559 + 560 + void EnvoyQuicProofSourceBase::ComputeTlsSignature( 561 + const quic::QuicSocketAddress& server_address, const quic::QuicSocketAddress& client_address, 562 + - const std::string& hostname, uint16_t signature_algorithm, quiche::QuicheStringPiece in, 563 + + const std::string& hostname, uint16_t signature_algorithm, absl::string_view in, 564 + std::unique_ptr<quic::ProofSource::SignatureCallback> callback) { 565 + signPayload(server_address, client_address, hostname, signature_algorithm, in, 566 + std::move(callback)); 567 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_proof_source_base.h b/source/extensions/quic_listeners/quiche/envoy_quic_proof_source_base.h 568 + index b7d76981e..a9e7e8c3f 100644 569 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_proof_source_base.h 570 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_proof_source_base.h 571 + @@ -57,7 +57,7 @@ public: 572 + void GetProof(const quic::QuicSocketAddress& server_address, 573 + const quic::QuicSocketAddress& client_address, const std::string& hostname, 574 + const std::string& server_config, quic::QuicTransportVersion /*transport_version*/, 575 + - quiche::QuicheStringPiece chlo_hash, 576 + + absl::string_view chlo_hash, 577 + std::unique_ptr<quic::ProofSource::Callback> callback) override; 578 + 579 + TicketCrypter* GetTicketCrypter() override { return nullptr; } 580 + @@ -65,14 +65,14 @@ public: 581 + void ComputeTlsSignature(const quic::QuicSocketAddress& server_address, 582 + const quic::QuicSocketAddress& client_address, 583 + const std::string& hostname, uint16_t signature_algorithm, 584 + - quiche::QuicheStringPiece in, 585 + + absl::string_view in, 586 + std::unique_ptr<quic::ProofSource::SignatureCallback> callback) override; 587 + 588 + protected: 589 + virtual void signPayload(const quic::QuicSocketAddress& server_address, 590 + const quic::QuicSocketAddress& client_address, 591 + const std::string& hostname, uint16_t signature_algorithm, 592 + - quiche::QuicheStringPiece in, 593 + + absl::string_view in, 594 + std::unique_ptr<quic::ProofSource::SignatureCallback> callback) PURE; 595 + 596 + private: 597 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_proof_verifier_base.cc b/source/extensions/quic_listeners/quiche/envoy_quic_proof_verifier_base.cc 598 + index 229b3ab36..e37590529 100644 599 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_proof_verifier_base.cc 600 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_proof_verifier_base.cc 601 + @@ -58,8 +58,8 @@ bool EnvoyQuicProofVerifierBase::verifySignature(const std::string& server_confi 602 + *error_details = "QuicPacketWriter error."; 603 + return false; 604 + } 605 + - bool valid = cert_view->VerifySignature(quiche::QuicheStringPiece(payload.get(), payload_size), 606 + - signature, sign_alg); 607 + + bool valid = cert_view->VerifySignature(absl::string_view(payload.get(), payload_size), signature, 608 + + sign_alg); 609 + if (!valid) { 610 + *error_details = "Signature is not valid."; 611 + } 612 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_server_connection.cc b/source/extensions/quic_listeners/quiche/envoy_quic_server_connection.cc 613 + index b8fa94221..974c6c8eb 100644 614 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_server_connection.cc 615 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_server_connection.cc 616 + @@ -11,11 +11,13 @@ namespace Quic { 617 + 618 + EnvoyQuicServerConnection::EnvoyQuicServerConnection( 619 + const quic::QuicConnectionId& server_connection_id, 620 + - quic::QuicSocketAddress initial_peer_address, quic::QuicConnectionHelperInterface& helper, 621 + - quic::QuicAlarmFactory& alarm_factory, quic::QuicPacketWriter* writer, bool owns_writer, 622 + + quic::QuicSocketAddress initial_self_address, quic::QuicSocketAddress initial_peer_address, 623 + + quic::QuicConnectionHelperInterface& helper, quic::QuicAlarmFactory& alarm_factory, 624 + + quic::QuicPacketWriter* writer, bool owns_writer, 625 + const quic::ParsedQuicVersionVector& supported_versions, Network::Socket& listen_socket) 626 + - : EnvoyQuicConnection(server_connection_id, initial_peer_address, helper, alarm_factory, writer, 627 + - owns_writer, quic::Perspective::IS_SERVER, supported_versions, 628 + + : EnvoyQuicConnection(server_connection_id, initial_self_address, initial_peer_address, helper, 629 + + alarm_factory, writer, owns_writer, quic::Perspective::IS_SERVER, 630 + + supported_versions, 631 + std::make_unique<Network::ConnectionSocketImpl>( 632 + // Wraps the real IoHandle instance so that if the connection socket 633 + // gets closed, the real IoHandle won't be affected. 634 + diff --git a/source/extensions/quic_listeners/quiche/envoy_quic_server_connection.h b/source/extensions/quic_listeners/quiche/envoy_quic_server_connection.h 635 + index 7b7fac05e..7625fad02 100644 636 + --- a/source/extensions/quic_listeners/quiche/envoy_quic_server_connection.h 637 + +++ b/source/extensions/quic_listeners/quiche/envoy_quic_server_connection.h 638 + @@ -10,6 +10,7 @@ namespace Quic { 639 + class EnvoyQuicServerConnection : public EnvoyQuicConnection { 640 + public: 641 + EnvoyQuicServerConnection(const quic::QuicConnectionId& server_connection_id, 642 + + quic::QuicSocketAddress initial_self_address, 643 + quic::QuicSocketAddress initial_peer_address, 644 + quic::QuicConnectionHelperInterface& helper, 645 + quic::QuicAlarmFactory& alarm_factory, quic::QuicPacketWriter* writer, 646 + diff --git a/source/extensions/quic_listeners/quiche/platform/BUILD b/source/extensions/quic_listeners/quiche/platform/BUILD 647 + index f53e07b58..839664d52 100644 648 + --- a/source/extensions/quic_listeners/quiche/platform/BUILD 649 + +++ b/source/extensions/quic_listeners/quiche/platform/BUILD 650 + @@ -36,15 +36,16 @@ envoy_extension_package() 651 + envoy_cc_library( 652 + name = "flags_impl_lib", 653 + srcs = ["flags_impl.cc"], 654 + - hdrs = [ 655 + - "flags_impl.h", 656 + - "flags_list.h", 657 + - ], 658 + + hdrs = ["flags_impl.h"], 659 + external_deps = [ 660 + "abseil_base", 661 + "abseil_synchronization", 662 + ], 663 + visibility = ["//visibility:public"], 664 + + deps = [ 665 + + "@com_googlesource_quiche//:quic_core_flags_list_lib", 666 + + "@com_googlesource_quiche//:quic_core_protocol_flags_list_lib", 667 + + ], 668 + ) 669 + 670 + envoy_cc_library( 671 + @@ -62,7 +63,6 @@ envoy_cc_library( 672 + envoy_cc_library( 673 + name = "http2_platform_impl_lib", 674 + hdrs = [ 675 + - "http2_arraysize_impl.h", 676 + "http2_bug_tracker_impl.h", 677 + "http2_containers_impl.h", 678 + "http2_estimate_memory_usage_impl.h", 679 + @@ -74,7 +74,6 @@ envoy_cc_library( 680 + ], 681 + external_deps = [ 682 + "abseil_base", 683 + - "abseil_optional", 684 + "abseil_str_format", 685 + ], 686 + visibility = ["//visibility:public"], 687 + @@ -114,16 +113,13 @@ envoy_cc_library( 688 + "quic_mem_slice_impl.cc", 689 + ], 690 + hdrs = [ 691 + - "quic_aligned_impl.h", 692 + "quic_client_stats_impl.h", 693 + "quic_containers_impl.h", 694 + "quic_error_code_wrappers_impl.h", 695 + "quic_estimate_memory_usage_impl.h", 696 + - "quic_fallthrough_impl.h", 697 + "quic_flag_utils_impl.h", 698 + "quic_flags_impl.h", 699 + "quic_iovec_impl.h", 700 + - "quic_macros_impl.h", 701 + "quic_map_util_impl.h", 702 + "quic_mem_slice_impl.h", 703 + "quic_prefetch_impl.h", 704 + @@ -132,6 +128,7 @@ envoy_cc_library( 705 + "quic_server_stats_impl.h", 706 + "quic_stack_trace_impl.h", 707 + "quic_stream_buffer_allocator_impl.h", 708 + + "quic_testvalue_impl.h", 709 + "quic_uint128_impl.h", 710 + ], 711 + external_deps = [ 712 + @@ -141,7 +138,6 @@ envoy_cc_library( 713 + "abseil_memory", 714 + "abseil_node_hash_map", 715 + "abseil_node_hash_set", 716 + - "abseil_optional", 717 + ], 718 + tags = ["nofips"], 719 + visibility = ["//visibility:public"], 720 + @@ -236,6 +232,7 @@ envoy_cc_library( 721 + }), 722 + repository = "@envoy", 723 + tags = ["nofips"], 724 + + visibility = ["//visibility:public"], 725 + ) 726 + 727 + envoy_cc_library( 728 + @@ -250,23 +247,12 @@ envoy_cc_library( 729 + ], 730 + ) 731 + 732 + -envoy_cc_library( 733 + - name = "quiche_common_platform_optional_impl_lib", 734 + - hdrs = ["quiche_optional_impl.h"], 735 + - external_deps = [ 736 + - "abseil_node_hash_map", 737 + - ], 738 + - visibility = ["//visibility:public"], 739 + -) 740 + - 741 + envoy_cc_library( 742 + name = "quiche_common_platform_impl_lib", 743 + srcs = ["quiche_time_utils_impl.cc"], 744 + hdrs = [ 745 + - "quiche_arraysize_impl.h", 746 + "quiche_logging_impl.h", 747 + "quiche_map_util_impl.h", 748 + - "quiche_ptr_util_impl.h", 749 + "quiche_str_cat_impl.h", 750 + "quiche_string_piece_impl.h", 751 + "quiche_text_utils_impl.h", 752 + @@ -281,17 +267,14 @@ envoy_cc_library( 753 + deps = [ 754 + ":quic_platform_logging_impl_lib", 755 + ":string_utils_lib", 756 + - "@com_googlesource_quiche//:quiche_common_platform_optional", 757 + ], 758 + ) 759 + 760 + envoy_cc_library( 761 + name = "spdy_platform_impl_lib", 762 + hdrs = [ 763 + - "spdy_arraysize_impl.h", 764 + "spdy_bug_tracker_impl.h", 765 + "spdy_containers_impl.h", 766 + - "spdy_endianness_util_impl.h", 767 + "spdy_estimate_memory_usage_impl.h", 768 + "spdy_flags_impl.h", 769 + "spdy_logging_impl.h", 770 + @@ -331,14 +314,3 @@ envoy_cc_library( 771 + tags = ["nofips"], 772 + visibility = ["//visibility:public"], 773 + ) 774 + - 775 + -envoy_cc_library( 776 + - name = "quiche_common_platform_endian_impl_lib", 777 + - hdrs = ["quiche_endian_impl.h"], 778 + - tags = ["nofips"], 779 + - visibility = ["//visibility:public"], 780 + - deps = [ 781 + - "quiche_common_platform_export_impl_lib", 782 + - "//source/common/common:byte_order_lib", 783 + - ], 784 + -) 785 + diff --git a/source/extensions/quic_listeners/quiche/platform/flags_impl.cc b/source/extensions/quic_listeners/quiche/platform/flags_impl.cc 786 + index 70fb182d6..9d4ea89ce 100644 787 + --- a/source/extensions/quic_listeners/quiche/platform/flags_impl.cc 788 + +++ b/source/extensions/quic_listeners/quiche/platform/flags_impl.cc 789 + @@ -15,12 +15,24 @@ namespace quiche { 790 + 791 + namespace { 792 + 793 + -absl::flat_hash_map<std::string, Flag*> MakeFlagMap() { 794 + +absl::flat_hash_map<std::string, Flag*> makeFlagMap() { 795 + absl::flat_hash_map<std::string, Flag*> flags; 796 + 797 + -#define QUICHE_FLAG(type, flag, value, help) flags.emplace(FLAGS_##flag->name(), FLAGS_##flag); 798 + -#include "extensions/quic_listeners/quiche/platform/flags_list.h" 799 + -#undef QUICHE_FLAG 800 + +#define QUIC_FLAG(flag, ...) flags.emplace(flag->name(), flag); 801 + +#include "quiche/quic/core/quic_flags_list.h" 802 + + QUIC_FLAG(FLAGS_quic_reloadable_flag_spdy_testonly_default_false, false) 803 + + QUIC_FLAG(FLAGS_quic_reloadable_flag_spdy_testonly_default_true, true) 804 + + QUIC_FLAG(FLAGS_quic_restart_flag_spdy_testonly_default_false, false) 805 + + QUIC_FLAG(FLAGS_quic_restart_flag_spdy_testonly_default_true, true) 806 + + QUIC_FLAG(FLAGS_quic_reloadable_flag_http2_testonly_default_false, false) 807 + + QUIC_FLAG(FLAGS_quic_reloadable_flag_http2_testonly_default_true, true) 808 + + QUIC_FLAG(FLAGS_quic_restart_flag_http2_testonly_default_false, false) 809 + + QUIC_FLAG(FLAGS_quic_restart_flag_http2_testonly_default_true, true) 810 + +#undef QUIC_FLAG 811 + + 812 + +#define QUIC_PROTOCOL_FLAG(type, flag, ...) flags.emplace(FLAGS_##flag->name(), FLAGS_##flag); 813 + +#include "quiche/quic/core/quic_protocol_flags_list.h" 814 + +#undef QUIC_PROTOCOL_FLAG 815 + 816 + return flags; 817 + } 818 + @@ -28,75 +40,123 @@ absl::flat_hash_map<std::string, Flag*> MakeFlagMap() { 819 + } // namespace 820 + 821 + // static 822 + -FlagRegistry& FlagRegistry::GetInstance() { 823 + +FlagRegistry& FlagRegistry::getInstance() { 824 + static auto* instance = new FlagRegistry(); 825 + return *instance; 826 + } 827 + 828 + -FlagRegistry::FlagRegistry() : flags_(MakeFlagMap()) {} 829 + +FlagRegistry::FlagRegistry() : flags_(makeFlagMap()) {} 830 + 831 + -void FlagRegistry::ResetFlags() const { 832 + +void FlagRegistry::resetFlags() const { 833 + for (auto& kv : flags_) { 834 + - kv.second->ResetValue(); 835 + + kv.second->resetValue(); 836 + } 837 + } 838 + 839 + -Flag* FlagRegistry::FindFlag(const std::string& name) const { 840 + +Flag* FlagRegistry::findFlag(const std::string& name) const { 841 + auto it = flags_.find(name); 842 + return (it != flags_.end()) ? it->second : nullptr; 843 + } 844 + 845 + -template <> bool TypedFlag<bool>::SetValueFromString(const std::string& value_str) { 846 + +template <> bool TypedFlag<bool>::setValueFromString(const std::string& value_str) { 847 + static const auto* kTrueValues = new std::set<std::string>({"1", "t", "true", "y", "yes"}); 848 + static const auto* kFalseValues = new std::set<std::string>({"0", "f", "false", "n", "no"}); 849 + auto lower = absl::AsciiStrToLower(value_str); 850 + if (kTrueValues->find(lower) != kTrueValues->end()) { 851 + - SetValue(true); 852 + + setValue(true); 853 + return true; 854 + } 855 + if (kFalseValues->find(lower) != kFalseValues->end()) { 856 + - SetValue(false); 857 + + setValue(false); 858 + return true; 859 + } 860 + return false; 861 + } 862 + 863 + -template <> bool TypedFlag<int32_t>::SetValueFromString(const std::string& value_str) { 864 + +template <> bool TypedFlag<int32_t>::setValueFromString(const std::string& value_str) { 865 + int32_t value; 866 + if (absl::SimpleAtoi(value_str, &value)) { 867 + - SetValue(value); 868 + + setValue(value); 869 + return true; 870 + } 871 + return false; 872 + } 873 + 874 + -template <> bool TypedFlag<int64_t>::SetValueFromString(const std::string& value_str) { 875 + +template <> bool TypedFlag<int64_t>::setValueFromString(const std::string& value_str) { 876 + int64_t value; 877 + if (absl::SimpleAtoi(value_str, &value)) { 878 + - SetValue(value); 879 + + setValue(value); 880 + return true; 881 + } 882 + return false; 883 + } 884 + 885 + -template <> bool TypedFlag<double>::SetValueFromString(const std::string& value_str) { 886 + +template <> bool TypedFlag<double>::setValueFromString(const std::string& value_str) { 887 + double value; 888 + if (absl::SimpleAtod(value_str, &value)) { 889 + - SetValue(value); 890 + + setValue(value); 891 + return true; 892 + } 893 + return false; 894 + } 895 + 896 + -template <> bool TypedFlag<std::string>::SetValueFromString(const std::string& value_str) { 897 + - SetValue(value_str); 898 + +template <> bool TypedFlag<std::string>::setValueFromString(const std::string& value_str) { 899 + + setValue(value_str); 900 + return true; 901 + } 902 + 903 + +template <> bool TypedFlag<unsigned long>::setValueFromString(const std::string& value_str) { 904 + + unsigned long value; 905 + + if (absl::SimpleAtoi(value_str, &value)) { 906 + + setValue(value); 907 + + return true; 908 + + } 909 + + return false; 910 + +} 911 + + 912 + +template <> bool TypedFlag<unsigned long long>::setValueFromString(const std::string& value_str) { 913 + + unsigned long long value; 914 + + if (absl::SimpleAtoi(value_str, &value)) { 915 + + setValue(value); 916 + + return true; 917 + + } 918 + + return false; 919 + +} 920 + + 921 + // Flag definitions 922 + -#define QUICHE_FLAG(type, flag, value, help) \ 923 + - TypedFlag<type>* FLAGS_##flag = new TypedFlag<type>(#flag, value, help); 924 + -#include "extensions/quic_listeners/quiche/platform/flags_list.h" 925 + -#undef QUICHE_FLAG 926 + +#define QUIC_FLAG(flag, value) TypedFlag<bool>* flag = new TypedFlag<bool>(#flag, value, ""); 927 + +#include "quiche/quic/core/quic_flags_list.h" 928 + +QUIC_FLAG(FLAGS_quic_reloadable_flag_spdy_testonly_default_false, false) 929 + +QUIC_FLAG(FLAGS_quic_reloadable_flag_spdy_testonly_default_true, true) 930 + +QUIC_FLAG(FLAGS_quic_restart_flag_spdy_testonly_default_false, false) 931 + +QUIC_FLAG(FLAGS_quic_restart_flag_spdy_testonly_default_true, true) 932 + +QUIC_FLAG(FLAGS_quic_reloadable_flag_http2_testonly_default_false, false) 933 + +QUIC_FLAG(FLAGS_quic_reloadable_flag_http2_testonly_default_true, true) 934 + +QUIC_FLAG(FLAGS_quic_restart_flag_http2_testonly_default_false, false) 935 + +QUIC_FLAG(FLAGS_quic_restart_flag_http2_testonly_default_true, true) 936 + + 937 + +#undef QUIC_FLAG 938 + + 939 + +#define STRINGIFY(X) #X 940 + + 941 + +#define DEFINE_QUIC_PROTOCOL_FLAG_IMPL(type, flag, value, help) \ 942 + + TypedFlag<type>* FLAGS_##flag = new TypedFlag<type>(STRINGIFY(FLAGS_##flag), value, help); 943 + + 944 + +#define DEFINE_QUIC_PROTOCOL_FLAG_SINGLE_VALUE(type, flag, value, doc) \ 945 + + DEFINE_QUIC_PROTOCOL_FLAG_IMPL(type, flag, value, doc) 946 + + 947 + +#define DEFINE_QUIC_PROTOCOL_FLAG_TWO_VALUES(type, flag, internal_value, external_value, doc) \ 948 + + DEFINE_QUIC_PROTOCOL_FLAG_IMPL(type, flag, external_value, doc) 949 + + 950 + +// Select the right macro based on the number of arguments. 951 + +#define GET_6TH_ARG(arg1, arg2, arg3, arg4, arg5, arg6, ...) arg6 952 + + 953 + +#define QUIC_PROTOCOL_FLAG_MACRO_CHOOSER(...) \ 954 + + GET_6TH_ARG(__VA_ARGS__, DEFINE_QUIC_PROTOCOL_FLAG_TWO_VALUES, \ 955 + + DEFINE_QUIC_PROTOCOL_FLAG_SINGLE_VALUE) 956 + + 957 + +#define QUIC_PROTOCOL_FLAG(...) QUIC_PROTOCOL_FLAG_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__) 958 + +#include "quiche/quic/core/quic_protocol_flags_list.h" 959 + +#undef QUIC_PROTOCOL_FLAG 960 + 961 + } // namespace quiche 962 + diff --git a/source/extensions/quic_listeners/quiche/platform/flags_impl.h b/source/extensions/quic_listeners/quiche/platform/flags_impl.h 963 + index 5db939925..83ed8430c 100644 964 + --- a/source/extensions/quic_listeners/quiche/platform/flags_impl.h 965 + +++ b/source/extensions/quic_listeners/quiche/platform/flags_impl.h 966 + @@ -26,13 +26,13 @@ public: 967 + ~FlagRegistry() = default; 968 + 969 + // Return singleton instance. 970 + - static FlagRegistry& GetInstance(); 971 + + static FlagRegistry& getInstance(); 972 + 973 + // Reset all registered flags to their default values. 974 + - void ResetFlags() const; 975 + + void resetFlags() const; 976 + 977 + // Look up a flag by name. 978 + - Flag* FindFlag(const std::string& name) const; 979 + + Flag* findFlag(const std::string& name) const; 980 + 981 + private: 982 + FlagRegistry(); 983 + @@ -48,10 +48,10 @@ public: 984 + virtual ~Flag() = default; 985 + 986 + // Set flag value from given string, returning true iff successful. 987 + - virtual bool SetValueFromString(const std::string& value_str) = 0; 988 + + virtual bool setValueFromString(const std::string& value_str) = 0; 989 + 990 + // Reset flag to default value. 991 + - virtual void ResetValue() = 0; 992 + + virtual void resetValue() = 0; 993 + 994 + // Return flag name. 995 + std::string name() const { return name_; } 996 + @@ -70,15 +70,15 @@ public: 997 + TypedFlag(const char* name, T default_value, const char* help) 998 + : Flag(name, help), value_(default_value), default_value_(default_value) {} 999 + 1000 + - bool SetValueFromString(const std::string& value_str) override; 1001 + + bool setValueFromString(const std::string& value_str) override; 1002 + 1003 + - void ResetValue() override { 1004 + + void resetValue() override { 1005 + absl::MutexLock lock(&mutex_); 1006 + value_ = default_value_; 1007 + } 1008 + 1009 + // Set flag value. 1010 + - void SetValue(T value) { 1011 + + void setValue(T value) { 1012 + absl::MutexLock lock(&mutex_); 1013 + value_ = value; 1014 + } 1015 + @@ -96,15 +96,29 @@ private: 1016 + }; 1017 + 1018 + // SetValueFromString specializations 1019 + -template <> bool TypedFlag<bool>::SetValueFromString(const std::string& value_str); 1020 + -template <> bool TypedFlag<int32_t>::SetValueFromString(const std::string& value_str); 1021 + -template <> bool TypedFlag<int64_t>::SetValueFromString(const std::string& value_str); 1022 + -template <> bool TypedFlag<double>::SetValueFromString(const std::string& value_str); 1023 + -template <> bool TypedFlag<std::string>::SetValueFromString(const std::string& value_str); 1024 + +template <> bool TypedFlag<bool>::setValueFromString(const std::string& value_str); 1025 + +template <> bool TypedFlag<int32_t>::setValueFromString(const std::string& value_str); 1026 + +template <> bool TypedFlag<int64_t>::setValueFromString(const std::string& value_str); 1027 + +template <> bool TypedFlag<double>::setValueFromString(const std::string& value_str); 1028 + +template <> bool TypedFlag<std::string>::setValueFromString(const std::string& value_str); 1029 + +template <> bool TypedFlag<unsigned long>::setValueFromString(const std::string& value_str); 1030 + +template <> bool TypedFlag<unsigned long long>::setValueFromString(const std::string& value_str); 1031 + 1032 + // Flag declarations 1033 + -#define QUICHE_FLAG(type, flag, value, help) extern TypedFlag<type>* FLAGS_##flag; 1034 + -#include "extensions/quic_listeners/quiche/platform/flags_list.h" 1035 + -#undef QUICHE_FLAG 1036 + +#define QUIC_FLAG(flag, ...) extern TypedFlag<bool>* flag; 1037 + +#include "quiche/quic/core/quic_flags_list.h" 1038 + +QUIC_FLAG(FLAGS_quic_reloadable_flag_spdy_testonly_default_false, false) 1039 + +QUIC_FLAG(FLAGS_quic_reloadable_flag_spdy_testonly_default_true, true) 1040 + +QUIC_FLAG(FLAGS_quic_restart_flag_spdy_testonly_default_false, false) 1041 + +QUIC_FLAG(FLAGS_quic_restart_flag_spdy_testonly_default_true, true) 1042 + +QUIC_FLAG(FLAGS_quic_reloadable_flag_http2_testonly_default_false, false) 1043 + +QUIC_FLAG(FLAGS_quic_reloadable_flag_http2_testonly_default_true, true) 1044 + +QUIC_FLAG(FLAGS_quic_restart_flag_http2_testonly_default_false, false) 1045 + +QUIC_FLAG(FLAGS_quic_restart_flag_http2_testonly_default_true, true) 1046 + +#undef QUIC_FLAG 1047 + + 1048 + +#define QUIC_PROTOCOL_FLAG(type, flag, ...) extern TypedFlag<type>* FLAGS_##flag; 1049 + +#include "quiche/quic/core/quic_protocol_flags_list.h" 1050 + +#undef QUIC_PROTOCOL_FLAG 1051 + 1052 + } // namespace quiche 1053 + diff --git a/source/extensions/quic_listeners/quiche/platform/flags_list.h b/source/extensions/quic_listeners/quiche/platform/flags_list.h 1054 + deleted file mode 100644 1055 + index 7e9e20a7c..000000000 1056 + --- a/source/extensions/quic_listeners/quiche/platform/flags_list.h 1057 + +++ /dev/null 1058 + @@ -1,502 +0,0 @@ 1059 + -// This file intentionally does not have header guards. It is intended to be 1060 + -// included multiple times, each time with a different definition of 1061 + -// QUICHE_FLAG. 1062 + - 1063 + -// NOLINT(namespace-envoy) 1064 + - 1065 + -// This file is part of the QUICHE platform implementation, and is not to be 1066 + -// consumed or referenced directly by other Envoy code. It serves purely as a 1067 + -// porting layer for QUICHE. 1068 + - 1069 + -// This file is generated by //third_party/quic/tools:quic_flags_list in 1070 + -// Google3. 1071 + - 1072 + -#if defined(QUICHE_FLAG) 1073 + - 1074 + -QUICHE_FLAG( 1075 + - bool, http2_reloadable_flag_http2_backend_alpn_failure_error_code, false, 1076 + - "If true, the GFE will return a new ResponseCodeDetails error when ALPN to the backend fails.") 1077 + - 1078 + -QUICHE_FLAG(bool, http2_reloadable_flag_http2_ip_based_cwnd_exp, true, 1079 + - "If true, enable IP address based CWND bootstrapping experiment with different " 1080 + - "bandwidth models and priorities in HTTP2.") 1081 + - 1082 + -QUICHE_FLAG( 1083 + - bool, http2_reloadable_flag_http2_load_based_goaway_warning, false, 1084 + - "If true, load-based connection closures will send a warning GOAWAY before the actual GOAWAY.") 1085 + - 1086 + -QUICHE_FLAG(bool, http2_reloadable_flag_http2_security_requirement_for_client3, false, 1087 + - "If true, check whether client meets security requirements during SSL handshake. If " 1088 + - "flag is true and client does not meet security requirements, do not negotiate HTTP/2 " 1089 + - "with client or terminate the session with SPDY_INADEQUATE_SECURITY if HTTP/2 is " 1090 + - "already negotiated. The spec contains both cipher and TLS version requirements.") 1091 + - 1092 + -QUICHE_FLAG(bool, http2_reloadable_flag_http2_websocket_detection, false, 1093 + - "If true, uses a HTTP/2-specific method of detecting websocket upgrade requests.") 1094 + - 1095 + -QUICHE_FLAG(bool, http2_reloadable_flag_permissive_http2_switch, false, 1096 + - "If true, the GFE allows both HTTP/1.0 and HTTP/1.1 versions in HTTP/2 upgrade " 1097 + - "requests/responses.") 1098 + - 1099 + -QUICHE_FLAG(bool, quic_reloadable_flag_advertise_quic_for_https_for_debugips, false, "") 1100 + - 1101 + -QUICHE_FLAG(bool, quic_reloadable_flag_advertise_quic_for_https_for_external_users, false, "") 1102 + - 1103 + -QUICHE_FLAG(bool, quic_reloadable_flag_gclb_quic_allow_alia, true, 1104 + - "If gfe2_reloadable_flag_gclb_use_alia is also true, use Alia for GCLB QUIC " 1105 + - "handshakes. To be used as a big red button if there's a problem with Alia/QUIC.") 1106 + - 1107 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_abort_qpack_on_stream_close, false, 1108 + - "If true, abort async QPACK header decompression in QuicSpdyStream::OnClose().") 1109 + - 1110 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_ack_delay_alarm_granularity, false, 1111 + - "When true, ensure the ACK delay is never less than the alarm granularity when ACK " 1112 + - "decimation is enabled.") 1113 + - 1114 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_add_missing_connected_checks, false, 1115 + - "If true, add missing connected checks.") 1116 + - 1117 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_add_silent_idle_timeout, true, 1118 + - "If true, when server is silently closing connections due to idle timeout, serialize " 1119 + - "the connection close packets which will be added to time wait list.") 1120 + - 1121 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_add_stream_info_to_idle_close_detail, false, 1122 + - "If true, include stream information in idle timeout connection close detail.") 1123 + - 1124 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_allow_backend_set_stream_ttl, false, 1125 + - "If true, check backend response header for X-Response-Ttl. If it is provided, the " 1126 + - "stream TTL is set. A QUIC stream will be immediately canceled when tries to write " 1127 + - "data if this TTL expired.") 1128 + - 1129 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_allow_client_enabled_bbr_v2, true, 1130 + - "If true, allow client to enable BBRv2 on server via connection option 'B2ON'.") 1131 + - 1132 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_alpn_dispatch, false, 1133 + - "Support different QUIC sessions, as indicated by ALPN. Used for QBONE.") 1134 + - 1135 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_bbr2_avoid_too_low_probe_bw_cwnd, false, 1136 + - "If true, QUIC BBRv2's PROBE_BW mode will not reduce cwnd below BDP+ack_height.") 1137 + - 1138 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_bbr2_fewer_startup_round_trips, false, 1139 + - "When true, the 1RTT and 2RTT connection options decrease the number of round trips in " 1140 + - "BBRv2 STARTUP without a 25% bandwidth increase to 1 or 2 round trips respectively.") 1141 + - 1142 + -QUICHE_FLAG( 1143 + - bool, quic_reloadable_flag_quic_bbr2_limit_inflight_hi, false, 1144 + - "When true, the B2HI connection option limits reduction of inflight_hi to (1-Beta)*CWND.") 1145 + - 1146 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_bbr2_use_post_inflight_to_detect_queuing, false, 1147 + - "If true, QUIC BBRv2 will use inflight byte after congestion event to detect queuing " 1148 + - "during PROBE_UP.") 1149 + - 1150 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_bbr_no_bytes_acked_in_startup_recovery, false, 1151 + - "When in STARTUP and recovery, do not add bytes_acked to QUIC BBR's CWND in " 1152 + - "CalculateCongestionWindow()") 1153 + - 1154 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_bootstrap_cwnd_by_spdy_priority, true, 1155 + - "If true, bootstrap initial QUIC cwnd by SPDY priorities.") 1156 + - 1157 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_cap_large_client_initial_rtt, true, 1158 + - "If true, cap client suggested initial RTT to 1s if it is longer than 1s.") 1159 + - 1160 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_clean_up_spdy_session_destructor, false, 1161 + - "If true, QuicSpdySession's destructor won't need to do cleanup.") 1162 + - 1163 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_close_connection_in_on_can_write_with_blocked_writer, 1164 + - false, 1165 + - "If true, close connection if writer is still blocked while OnCanWrite is called.") 1166 + - 1167 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_close_connection_on_serialization_failure, false, 1168 + - "If true, close connection on packet serialization failures.") 1169 + - 1170 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_conservative_bursts, false, 1171 + - "If true, set burst token to 2 in cwnd bootstrapping experiment.") 1172 + - 1173 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_conservative_cwnd_and_pacing_gains, false, 1174 + - "If true, uses conservative cwnd gain and pacing gain when cwnd gets bootstrapped.") 1175 + - 1176 + -QUICHE_FLAG( 1177 + - bool, quic_reloadable_flag_quic_copy_bbr_cwnd_to_bbr2, false, 1178 + - "If true, when switching from BBR to BBRv2, BBRv2 will use BBR's cwnd as its initial cwnd.") 1179 + - 1180 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_default_enable_5rto_blackhole_detection2, true, 1181 + - "If true, default-enable 5RTO blachole detection.") 1182 + - 1183 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_default_on_pto, false, 1184 + - "If true, default on PTO which unifies TLP + RTO loss recovery.") 1185 + - 1186 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_default_to_bbr, true, 1187 + - "When true, defaults to BBR congestion control instead of Cubic.") 1188 + - 1189 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_default_to_bbr_v2, false, 1190 + - "If true, use BBRv2 as the default congestion controller. Takes precedence over " 1191 + - "--quic_default_to_bbr.") 1192 + - 1193 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_disable_server_blackhole_detection, false, 1194 + - "If true, disable blackhole detection on server side.") 1195 + - 1196 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_disable_version_draft_27, false, 1197 + - "If true, disable QUIC version h3-27.") 1198 + - 1199 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_disable_version_draft_29, false, 1200 + - "If true, disable QUIC version h3-29.") 1201 + - 1202 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_disable_version_q043, false, 1203 + - "If true, disable QUIC version Q043.") 1204 + - 1205 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_disable_version_q046, false, 1206 + - "If true, disable QUIC version Q046.") 1207 + - 1208 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_disable_version_q050, false, 1209 + - "If true, disable QUIC version Q050.") 1210 + - 1211 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_disable_version_t050, false, 1212 + - "If true, disable QUIC version h3-T050.") 1213 + - 1214 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_disable_version_t051, false, 1215 + - "If true, disable QUIC version h3-T051.") 1216 + - 1217 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_discard_initial_packet_with_key_dropped, false, 1218 + - "If true, discard INITIAL packet if the key has been dropped.") 1219 + - 1220 + -QUICHE_FLAG( 1221 + - bool, quic_reloadable_flag_quic_do_not_accept_stop_waiting, false, 1222 + - "In v44 and above, where STOP_WAITING is never sent, close the connection if it's received.") 1223 + - 1224 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_donot_reset_ideal_next_packet_send_time, false, 1225 + - "If true, stop resetting ideal_next_packet_send_time_ in pacing sender.") 1226 + - 1227 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_enable_loss_detection_experiment_at_gfe, false, 1228 + - "If ture, enable GFE-picked loss detection experiment.") 1229 + - 1230 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_enable_loss_detection_tuner, false, 1231 + - "If true, allow QUIC loss detection tuning to be enabled by connection option ELDT.") 1232 + - 1233 + -QUICHE_FLAG( 1234 + - bool, quic_reloadable_flag_quic_enable_mtu_discovery_at_server, false, 1235 + - "If true, QUIC will default enable MTU discovery at server, with a target of 1450 bytes.") 1236 + - 1237 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_enabled, false, "") 1238 + - 1239 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_fix_arm_pto_for_application_data, false, 1240 + - "If true, do not arm PTO for application data until handshake confirmed.") 1241 + - 1242 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_fix_bytes_left_for_batch_write, false, 1243 + - "If true, convert bytes_left_for_batch_write_ to unsigned int.") 1244 + - 1245 + -QUICHE_FLAG( 1246 + - bool, quic_reloadable_flag_quic_fix_http3_goaway_stream_id, false, 1247 + - "If true, send the lowest stream ID that can be retried by the client in a GOAWAY frame. If " 1248 + - "false, send the highest received stream ID, which actually should not be retried.") 1249 + - 1250 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_fix_out_of_order_sending, false, 1251 + - "If true, fix a potential out of order sending caused by handshake gets confirmed " 1252 + - "while the coalescer is not empty.") 1253 + - 1254 + -QUICHE_FLAG( 1255 + - bool, quic_reloadable_flag_quic_fix_pto_pending_timer_count, false, 1256 + - "If true, make sure there is pending timer credit when trying to PTO retransmit any packets.") 1257 + - 1258 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_fix_undecryptable_packets2, false, 1259 + - "If true, remove processed undecryptable packets.") 1260 + - 1261 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_get_stream_information_from_stream_map, true, 1262 + - "If true, gQUIC will only consult stream_map in QuicSession::GetNumActiveStreams().") 1263 + - 1264 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_give_sent_packet_to_debug_visitor_after_sent, false, 1265 + - "If true, QUIC connection will pass sent packet information to the debug visitor after " 1266 + - "a packet is recorded as sent in sent packet manager.") 1267 + - 1268 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_http3_new_default_urgency_value, false, 1269 + - "If true, QuicStream::kDefaultUrgency is 3, otherwise 1.") 1270 + - 1271 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_ip_based_cwnd_exp, true, 1272 + - "If true, enable IP address based CWND bootstrapping experiment with different " 1273 + - "bandwidth models and priorities. ") 1274 + - 1275 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_listener_never_fake_epollout, false, 1276 + - "If true, QuicListener::OnSocketIsWritable will always return false, which means there " 1277 + - "will never be a fake EPOLLOUT event in the next epoll iteration.") 1278 + - 1279 + -QUICHE_FLAG(bool, 1280 + - quic_reloadable_flag_quic_neuter_initial_packet_in_coalescer_with_initial_key_discarded, 1281 + - false, "If true, neuter initial packet in the coalescer when discarding initial keys.") 1282 + - 1283 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_no_dup_experiment_id_2, false, 1284 + - "If true, transport connection stats doesn't report duplicated experiments for same " 1285 + - "connection.") 1286 + - 1287 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_no_silent_close_for_idle_timeout, true, 1288 + - "If true, always send connection close for idle timeout if NSLC is received.") 1289 + - 1290 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_only_set_uaid_in_tcs_visitor, false, 1291 + - "If true, QuicTransportConnectionStatsVisitor::PopulateTransportConnectionStats will " 1292 + - "be the only place where TCS's uaid field is set.") 1293 + - 1294 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_only_truncate_long_cids, true, 1295 + - "In IETF QUIC, only truncate long CIDs from the client's Initial, don't modify them.") 1296 + - 1297 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_preferred_altsvc_version, false, 1298 + - "When true, we will send a preferred QUIC version at the start of our Alt-Svc list.") 1299 + - 1300 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_proxy_write_packed_strings, false, 1301 + - "If true, QuicProxyDispatcher will write packed_client_address and packed_server_vip " 1302 + - "in TcpProxyHeaderProto.") 1303 + - 1304 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_record_frontend_service_vip_mapping, true, 1305 + - "If true, for L1 GFE, as requests come in, record frontend service to VIP mapping " 1306 + - "which is used to announce VIP in SHLO for proxied sessions. ") 1307 + - 1308 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_record_received_min_ack_delay, false, 1309 + - "If true, record the received min_ack_delay in transport parameters to QUIC config.") 1310 + - 1311 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_reject_all_traffic, false, "") 1312 + - 1313 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_remove_zombie_streams, true, 1314 + - "If true, QuicSession doesn't keep a separate zombie_streams. Instead, all streams are " 1315 + - "stored in stream_map_.") 1316 + - 1317 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_require_handshake_confirmation, false, 1318 + - "If true, require handshake confirmation for QUIC connections, functionally disabling " 1319 + - "0-rtt handshakes.") 1320 + - 1321 + -QUICHE_FLAG( 1322 + - bool, quic_reloadable_flag_quic_send_key_update_not_yet_supported, false, 1323 + - "When true, QUIC+TLS versions will send the key_update_not_yet_supported transport parameter.") 1324 + - 1325 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_send_path_response, false, 1326 + - "If true, send PATH_RESPONSE upon receiving PATH_CHALLENGE regardless of perspective. " 1327 + - "--gfe2_reloadable_flag_quic_start_peer_migration_earlier has to be true before turn " 1328 + - "on this flag.") 1329 + - 1330 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_send_timestamps, false, 1331 + - "When the STMP connection option is sent by the client, timestamps in the QUIC ACK " 1332 + - "frame are sent and processed.") 1333 + - 1334 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_server_push, false, 1335 + - "If true, enable server push feature on QUIC.") 1336 + - 1337 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_set_resumed_ssl_session_early, false, 1338 + - "If true, set resumed_ssl_session if this is a 0-RTT connection.") 1339 + - 1340 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_start_peer_migration_earlier, false, 1341 + - "If true, while reading an IETF quic packet, start peer migration immediately when " 1342 + - "detecting the existence of any non-probing frame instead of at the end of the packet.") 1343 + - 1344 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_stop_sending_uses_ietf_error_code, false, 1345 + - "If true, use IETF QUIC application error codes in STOP_SENDING frames. If false, use " 1346 + - "QuicRstStreamErrorCodes.") 1347 + - 1348 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_testonly_default_false, false, 1349 + - "A testonly reloadable flag that will always default to false.") 1350 + - 1351 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_testonly_default_true, true, 1352 + - "A testonly reloadable flag that will always default to true.") 1353 + - 1354 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_unified_iw_options, false, 1355 + - "When true, set the initial congestion control window from connection options in " 1356 + - "QuicSentPacketManager rather than TcpCubicSenderBytes.") 1357 + - 1358 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_use_header_stage_idle_list2, false, 1359 + - "If true, use header stage idle list for QUIC connections in GFE.") 1360 + - 1361 + -QUICHE_FLAG(bool, quic_reloadable_flag_quic_use_leto_key_exchange, false, 1362 + - "If true, QUIC will attempt to use the Leto key exchange service and only fall back to " 1363 + - "local key exchange if that fails.") 1364 + - 1365 + -QUICHE_FLAG(bool, quic_reloadable_flag_send_quic_fallback_server_config_on_leto_error, false, 1366 + - "If true and using Leto for QUIC shared-key calculations, GFE will react to a failure " 1367 + - "to contact Leto by sending a REJ containing a fallback ServerConfig, allowing the " 1368 + - "client to continue the handshake.") 1369 + - 1370 + -QUICHE_FLAG( 1371 + - bool, quic_restart_flag_dont_fetch_quic_private_keys_from_leto, false, 1372 + - "If true, GFE will not request private keys when fetching QUIC ServerConfigs from Leto.") 1373 + - 1374 + -QUICHE_FLAG(bool, quic_restart_flag_quic_adjust_initial_cwnd_by_gws, true, 1375 + - "If true, GFE informs backend that a client request is the first one on the connection " 1376 + - "via frontline header \"first_request=1\". Also, adjust initial cwnd based on " 1377 + - "X-Google-Gws-Initial-Cwnd-Mode sent by GWS.") 1378 + - 1379 + -QUICHE_FLAG( 1380 + - bool, quic_restart_flag_quic_allow_loas_multipacket_chlo, false, 1381 + - "If true, inspects QUIC CHLOs for kLOAS and early creates sessions to allow multi-packet CHLOs") 1382 + - 1383 + -QUICHE_FLAG( 1384 + - bool, quic_restart_flag_quic_disable_gws_cwnd_experiment, false, 1385 + - "If true, X-Google-Gws-Initial-Cwnd-Mode related header sent by GWS becomes no-op for QUIC.") 1386 + - 1387 + -QUICHE_FLAG(bool, quic_restart_flag_quic_enable_tls_resumption_v4, true, 1388 + - "If true, enables support for TLS resumption in QUIC.") 1389 + - 1390 + -QUICHE_FLAG(bool, quic_restart_flag_quic_enable_zero_rtt_for_tls_v2, true, 1391 + - "If true, support for IETF QUIC 0-rtt is enabled.") 1392 + - 1393 + -QUICHE_FLAG(bool, quic_restart_flag_quic_offload_pacing_to_usps2, false, 1394 + - "If true, QUIC offload pacing when using USPS as egress method.") 1395 + - 1396 + -QUICHE_FLAG(bool, quic_restart_flag_quic_rx_ring_use_tpacket_v3, false, 1397 + - "If true, use TPACKET_V3 for QuicRxRing instead of TPACKET_V2.") 1398 + - 1399 + -QUICHE_FLAG(bool, quic_restart_flag_quic_should_accept_new_connection, false, 1400 + - "If true, reject QUIC CHLO packets when dispatcher is asked to do so.") 1401 + - 1402 + -QUICHE_FLAG(bool, quic_restart_flag_quic_support_release_time_for_gso, false, 1403 + - "If true, QuicGsoBatchWriter will support release time if it is available and the " 1404 + - "process has the permission to do so.") 1405 + - 1406 + -QUICHE_FLAG(bool, quic_restart_flag_quic_testonly_default_false, false, 1407 + - "A testonly restart flag that will always default to false.") 1408 + - 1409 + -QUICHE_FLAG(bool, quic_restart_flag_quic_testonly_default_true, true, 1410 + - "A testonly restart flag that will always default to true.") 1411 + - 1412 + -QUICHE_FLAG( 1413 + - bool, quic_restart_flag_quic_use_leto_for_quic_configs, false, 1414 + - "If true, use Leto to fetch QUIC server configs instead of using the seeds from Memento.") 1415 + - 1416 + -QUICHE_FLAG(bool, quic_restart_flag_quic_use_pigeon_socket_to_backend, false, 1417 + - "If true, create a shared pigeon socket for all quic to backend connections and switch " 1418 + - "to use it after successful handshake.") 1419 + - 1420 + -QUICHE_FLAG(bool, spdy_reloadable_flag_quic_bootstrap_cwnd_by_spdy_priority, true, 1421 + - "If true, bootstrap initial QUIC cwnd by SPDY priorities.") 1422 + - 1423 + -QUICHE_FLAG(bool, spdy_reloadable_flag_quic_clean_up_spdy_session_destructor, false, 1424 + - "If true, QuicSpdySession's destructor won't need to do cleanup.") 1425 + - 1426 + -QUICHE_FLAG( 1427 + - bool, spdy_reloadable_flag_spdy_discard_response_body_if_disallowed, false, 1428 + - "If true, SPDY will discard all response body bytes when response code indicates no response " 1429 + - "body should exist. Previously, we only discard partial bytes on the first response processing " 1430 + - "and the rest of the response bytes would still be delivered even though the response code " 1431 + - "said there should not be any body associated with the response code.") 1432 + - 1433 + -QUICHE_FLAG(bool, quic_allow_chlo_buffering, true, 1434 + - "If true, allows packets to be buffered in anticipation of a " 1435 + - "future CHLO, and allow CHLO packets to be buffered until next " 1436 + - "iteration of the event loop.") 1437 + - 1438 + -QUICHE_FLAG(bool, quic_disable_pacing_for_perf_tests, false, "If true, disable pacing in QUIC") 1439 + - 1440 + -QUICHE_FLAG(bool, quic_enforce_single_packet_chlo, true, 1441 + - "If true, enforce that QUIC CHLOs fit in one packet") 1442 + - 1443 + -QUICHE_FLAG(int64_t, quic_time_wait_list_max_connections, 600000, 1444 + - "Maximum number of connections on the time-wait list. " 1445 + - "A negative value implies no configured limit.") 1446 + - 1447 + -QUICHE_FLAG(int64_t, quic_time_wait_list_seconds, 200, 1448 + - "Time period for which a given connection_id should live in " 1449 + - "the time-wait state.") 1450 + - 1451 + -QUICHE_FLAG(double, quic_bbr_cwnd_gain, 2.0f, 1452 + - "Congestion window gain for QUIC BBR during PROBE_BW phase.") 1453 + - 1454 + -QUICHE_FLAG(int32_t, quic_buffered_data_threshold, 8 * 1024, 1455 + - "If buffered data in QUIC stream is less than this " 1456 + - "threshold, buffers all provided data or asks upper layer for more data") 1457 + - 1458 + -QUICHE_FLAG(int32_t, quic_send_buffer_max_data_slice_size, 4 * 1024, 1459 + - "Max size of data slice in bytes for QUIC stream send buffer.") 1460 + - 1461 + -QUICHE_FLAG(int32_t, quic_lumpy_pacing_size, 2, 1462 + - "Number of packets that the pacing sender allows in bursts during " 1463 + - "pacing. This flag is ignored if a flow's estimated bandwidth is " 1464 + - "lower than 1200 kbps.") 1465 + - 1466 + -QUICHE_FLAG(double, quic_lumpy_pacing_cwnd_fraction, 0.25f, 1467 + - "Congestion window fraction that the pacing sender allows in bursts " 1468 + - "during pacing.") 1469 + - 1470 + -QUICHE_FLAG(int32_t, quic_max_pace_time_into_future_ms, 10, 1471 + - "Max time that QUIC can pace packets into the future in ms.") 1472 + - 1473 + -QUICHE_FLAG(double, quic_pace_time_into_future_srtt_fraction, 0.125f, 1474 + - "Smoothed RTT fraction that a connection can pace packets into the future.") 1475 + - 1476 + -QUICHE_FLAG(bool, quic_export_server_num_packets_per_write_histogram, false, 1477 + - "If true, export number of packets written per write operation histogram.") 1478 + - 1479 + -QUICHE_FLAG(bool, quic_disable_version_negotiation_grease_randomness, false, 1480 + - "If true, use predictable version negotiation versions.") 1481 + - 1482 + -QUICHE_FLAG(bool, quic_enable_http3_grease_randomness, true, 1483 + - "If true, use random greased settings and frames.") 1484 + - 1485 + -QUICHE_FLAG(int64_t, quic_max_tracked_packet_count, 10000, "Maximum number of tracked packets.") 1486 + - 1487 + -QUICHE_FLAG(bool, quic_prober_uses_length_prefixed_connection_ids, false, 1488 + - "If true, QuicFramer::WriteClientVersionNegotiationProbePacket uses " 1489 + - "length-prefixed connection IDs.") 1490 + - 1491 + -QUICHE_FLAG(bool, quic_client_convert_http_header_name_to_lowercase, true, 1492 + - "If true, HTTP request header names sent from QuicSpdyClientBase(and " 1493 + - "descendents) will be automatically converted to lower case.") 1494 + - 1495 + -QUICHE_FLAG(bool, quic_enable_http3_server_push, false, 1496 + - "If true, server push will be allowed in QUIC versions that use HTTP/3.") 1497 + - 1498 + -QUICHE_FLAG(int32_t, quic_bbr2_default_probe_bw_base_duration_ms, 2000, 1499 + - "The default minimum duration for BBRv2-native probes, in milliseconds.") 1500 + - 1501 + -QUICHE_FLAG(int32_t, quic_bbr2_default_probe_bw_max_rand_duration_ms, 1000, 1502 + - "The default upper bound of the random amount of BBRv2-native " 1503 + - "probes, in milliseconds.") 1504 + - 1505 + -QUICHE_FLAG(int32_t, quic_bbr2_default_probe_rtt_period_ms, 10000, 1506 + - "The default period for entering PROBE_RTT, in milliseconds.") 1507 + - 1508 + -QUICHE_FLAG(double, quic_bbr2_default_loss_threshold, 0.02, 1509 + - "The default loss threshold for QUIC BBRv2, should be a value " 1510 + - "between 0 and 1.") 1511 + - 1512 + -QUICHE_FLAG(int32_t, quic_bbr2_default_startup_full_loss_count, 8, 1513 + - "The default minimum number of loss marking events to exit STARTUP.") 1514 + - 1515 + -QUICHE_FLAG(int32_t, quic_bbr2_default_probe_bw_full_loss_count, 2, 1516 + - "The default minimum number of loss marking events to exit PROBE_UP phase.") 1517 + - 1518 + -QUICHE_FLAG(double, quic_bbr2_default_inflight_hi_headroom, 0.01, 1519 + - "The default fraction of unutilized headroom to try to leave in path " 1520 + - "upon high loss.") 1521 + - 1522 + -QUICHE_FLAG(int32_t, quic_bbr2_default_initial_ack_height_filter_window, 10, 1523 + - "The default initial value of the max ack height filter's window length.") 1524 + - 1525 + -QUICHE_FLAG(double, quic_ack_aggregation_bandwidth_threshold, 1.0, 1526 + - "If the bandwidth during ack aggregation is smaller than (estimated " 1527 + - "bandwidth * this flag), consider the current aggregation completed " 1528 + - "and starts a new one.") 1529 + - 1530 + -QUICHE_FLAG(int32_t, quic_anti_amplification_factor, 5, 1531 + - "Anti-amplification factor. Before address validation, server will " 1532 + - "send no more than factor times bytes received.") 1533 + - 1534 + -QUICHE_FLAG(int32_t, quic_max_buffered_crypto_bytes, 16 * 1024, 1535 + - "The maximum amount of CRYPTO frame data that can be buffered.") 1536 + - 1537 + -QUICHE_FLAG(int32_t, quic_max_aggressive_retransmittable_on_wire_ping_count, 0, 1538 + - "If set to non-zero, the maximum number of consecutive pings that " 1539 + - "can be sent with aggressive initial retransmittable on wire timeout " 1540 + - "if there is no new data received. After which, the timeout will be " 1541 + - "exponentially back off until exceeds the default ping timeout.") 1542 + - 1543 + -QUICHE_FLAG(int32_t, quic_max_congestion_window, 2000, "The maximum congestion window in packets.") 1544 + - 1545 + -QUICHE_FLAG(int32_t, quic_max_streams_window_divisor, 2, 1546 + - "The divisor that controls how often MAX_STREAMS frame is sent.") 1547 + - 1548 + -QUICHE_FLAG(bool, http2_reloadable_flag_http2_testonly_default_false, false, 1549 + - "A testonly reloadable flag that will always default to false.") 1550 + - 1551 + -QUICHE_FLAG(bool, http2_restart_flag_http2_testonly_default_false, false, 1552 + - "A testonly restart flag that will always default to false.") 1553 + - 1554 + -QUICHE_FLAG(bool, spdy_reloadable_flag_spdy_testonly_default_false, false, 1555 + - "A testonly reloadable flag that will always default to false.") 1556 + - 1557 + -QUICHE_FLAG(bool, spdy_restart_flag_spdy_testonly_default_false, false, 1558 + - "A testonly restart flag that will always default to false.") 1559 + - 1560 + -#endif 1561 + diff --git a/source/extensions/quic_listeners/quiche/platform/http2_flags_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_flags_impl.h 1562 + index 7d2561469..dc6fe5429 100644 1563 + --- a/source/extensions/quic_listeners/quiche/platform/http2_flags_impl.h 1564 + +++ b/source/extensions/quic_listeners/quiche/platform/http2_flags_impl.h 1565 + @@ -8,10 +8,10 @@ 1566 + 1567 + #include "extensions/quic_listeners/quiche/platform/flags_impl.h" 1568 + 1569 + -#define GetHttp2ReloadableFlagImpl(flag) quiche::FLAGS_http2_reloadable_flag_##flag->value() 1570 + +#define GetHttp2ReloadableFlagImpl(flag) quiche::FLAGS_quic_reloadable_flag_##flag->value() 1571 + 1572 + #define SetHttp2ReloadableFlagImpl(flag, value) \ 1573 + - quiche::FLAGS_http2_reloadable_flag_##flag->SetValue(value) 1574 + + quiche::FLAGS_quic_reloadable_flag_##flag->setValue(value) 1575 + 1576 + #define HTTP2_CODE_COUNT_N_IMPL(flag, instance, total) \ 1577 + do { \ 1578 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_aligned_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_aligned_impl.h 1579 + deleted file mode 100644 1580 + index 3f595380b..000000000 1581 + --- a/source/extensions/quic_listeners/quiche/platform/quic_aligned_impl.h 1582 + +++ /dev/null 1583 + @@ -1,18 +0,0 @@ 1584 + -#pragma once 1585 + - 1586 + -#include "absl/base/optimization.h" 1587 + - 1588 + -// NOLINT(namespace-envoy) 1589 + - 1590 + -// This file is part of the QUICHE platform implementation, and is not to be 1591 + -// consumed or referenced directly by other Envoy code. It serves purely as a 1592 + -// porting layer for QUICHE. 1593 + - 1594 + -#define QUIC_ALIGN_OF_IMPL alignof 1595 + -#ifdef _MSC_VER 1596 + -#define QUIC_ALIGNED_IMPL(X) __declspec(align(X)) 1597 + -#else 1598 + -#define QUIC_ALIGNED_IMPL(X) __attribute__((aligned(X))) 1599 + -#endif 1600 + -#define QUIC_CACHELINE_ALIGNED_IMPL ABSL_CACHELINE_ALIGNED 1601 + -#define QUIC_CACHELINE_SIZE_IMPL ABSL_CACHELINE_SIZE 1602 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_cert_utils_impl.cc b/source/extensions/quic_listeners/quiche/platform/quic_cert_utils_impl.cc 1603 + index 2a886a12c..27b977908 100644 1604 + --- a/source/extensions/quic_listeners/quiche/platform/quic_cert_utils_impl.cc 1605 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_cert_utils_impl.cc 1606 + @@ -10,25 +10,7 @@ 1607 + 1608 + namespace quic { 1609 + 1610 + -// static 1611 + -bool QuicCertUtilsImpl::ExtractSubjectNameFromDERCert(quiche::QuicheStringPiece cert, 1612 + - quiche::QuicheStringPiece* subject_out) { 1613 + - CBS tbs_certificate; 1614 + - if (!SeekToSubject(cert, &tbs_certificate)) { 1615 + - return false; 1616 + - } 1617 + - 1618 + - CBS subject; 1619 + - if (!CBS_get_asn1_element(&tbs_certificate, &subject, CBS_ASN1_SEQUENCE)) { 1620 + - return false; 1621 + - } 1622 + - *subject_out = 1623 + - absl::string_view(reinterpret_cast<const char*>(CBS_data(&subject)), CBS_len(&subject)); 1624 + - return true; 1625 + -} 1626 + - 1627 + -// static 1628 + -bool QuicCertUtilsImpl::SeekToSubject(quiche::QuicheStringPiece cert, CBS* tbs_certificate) { 1629 + +bool seekToSubject(absl::string_view cert, CBS* tbs_certificate) { 1630 + CBS der; 1631 + CBS_init(&der, reinterpret_cast<const uint8_t*>(cert.data()), cert.size()); 1632 + CBS certificate; 1633 + @@ -65,4 +47,22 @@ bool QuicCertUtilsImpl::SeekToSubject(quiche::QuicheStringPiece cert, CBS* tbs_c 1634 + return true; 1635 + } 1636 + 1637 + +// static 1638 + +// NOLINTNEXTLINE(readability-identifier-naming) 1639 + +bool QuicCertUtilsImpl::ExtractSubjectNameFromDERCert(absl::string_view cert, 1640 + + absl::string_view* subject_out) { 1641 + + CBS tbs_certificate; 1642 + + if (!seekToSubject(cert, &tbs_certificate)) { 1643 + + return false; 1644 + + } 1645 + + 1646 + + CBS subject; 1647 + + if (!CBS_get_asn1_element(&tbs_certificate, &subject, CBS_ASN1_SEQUENCE)) { 1648 + + return false; 1649 + + } 1650 + + *subject_out = 1651 + + absl::string_view(reinterpret_cast<const char*>(CBS_data(&subject)), CBS_len(&subject)); 1652 + + return true; 1653 + +} 1654 + + 1655 + } // namespace quic 1656 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_cert_utils_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_cert_utils_impl.h 1657 + index 0c41b9dbc..29b882b7d 100644 1658 + --- a/source/extensions/quic_listeners/quiche/platform/quic_cert_utils_impl.h 1659 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_cert_utils_impl.h 1660 + @@ -6,18 +6,15 @@ 1661 + // consumed or referenced directly by other Envoy code. It serves purely as a 1662 + // porting layer for QUICHE. 1663 + 1664 + +#include "absl/strings/string_view.h" 1665 + #include "openssl/base.h" 1666 + -#include "quiche/common/platform/api/quiche_string_piece.h" 1667 + 1668 + namespace quic { 1669 + 1670 + class QuicCertUtilsImpl { 1671 + public: 1672 + - static bool ExtractSubjectNameFromDERCert(quiche::QuicheStringPiece cert, 1673 + - quiche::QuicheStringPiece* subject_out); 1674 + - 1675 + -private: 1676 + - static bool SeekToSubject(quiche::QuicheStringPiece cert, CBS* tbs_certificate); 1677 + + // NOLINTNEXTLINE(readability-identifier-naming) 1678 + + static bool ExtractSubjectNameFromDERCert(absl::string_view cert, absl::string_view* subject_out); 1679 + }; 1680 + 1681 + } // namespace quic 1682 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_fallthrough_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_fallthrough_impl.h 1683 + deleted file mode 100644 1684 + index aa9d6bc36..000000000 1685 + --- a/source/extensions/quic_listeners/quiche/platform/quic_fallthrough_impl.h 1686 + +++ /dev/null 1687 + @@ -1,11 +0,0 @@ 1688 + -#pragma once 1689 + - 1690 + -// NOLINT(namespace-envoy) 1691 + - 1692 + -// This file is part of the QUICHE platform implementation, and is not to be 1693 + -// consumed or referenced directly by other Envoy code. It serves purely as a 1694 + -// porting layer for QUICHE. 1695 + - 1696 + -#include "absl/base/macros.h" 1697 + - 1698 + -#define QUIC_FALLTHROUGH_INTENDED_IMPL ABSL_FALLTHROUGH_INTENDED 1699 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_file_utils_impl.cc b/source/extensions/quic_listeners/quiche/platform/quic_file_utils_impl.cc 1700 + index 91d52c44a..b2e396fab 100644 1701 + --- a/source/extensions/quic_listeners/quiche/platform/quic_file_utils_impl.cc 1702 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_file_utils_impl.cc 1703 + @@ -36,6 +36,7 @@ void depthFirstTraverseDirectory(const std::string& dirname, std::vector<std::st 1704 + } // namespace 1705 + 1706 + // Traverses the directory |dirname| and returns all of the files it contains. 1707 + +// NOLINTNEXTLINE(readability-identifier-naming) 1708 + std::vector<std::string> ReadFileContentsImpl(const std::string& dirname) { 1709 + std::vector<std::string> files; 1710 + depthFirstTraverseDirectory(dirname, files); 1711 + @@ -43,7 +44,8 @@ std::vector<std::string> ReadFileContentsImpl(const std::string& dirname) { 1712 + } 1713 + 1714 + // Reads the contents of |filename| as a string into |contents|. 1715 + -void ReadFileContentsImpl(quiche::QuicheStringPiece filename, std::string* contents) { 1716 + +// NOLINTNEXTLINE(readability-identifier-naming) 1717 + +void ReadFileContentsImpl(absl::string_view filename, std::string* contents) { 1718 + #ifdef WIN32 1719 + Envoy::Filesystem::InstanceImplWin32 fs; 1720 + #else 1721 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_file_utils_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_file_utils_impl.h 1722 + index 654c1ad18..25c31e9de 100644 1723 + --- a/source/extensions/quic_listeners/quiche/platform/quic_file_utils_impl.h 1724 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_file_utils_impl.h 1725 + @@ -8,7 +8,7 @@ 1726 + 1727 + #include <vector> 1728 + 1729 + -#include "quiche/common/platform/api/quiche_string_piece.h" 1730 + +#include "absl/strings/string_view.h" 1731 + 1732 + namespace quic { 1733 + 1734 + @@ -16,6 +16,7 @@ namespace quic { 1735 + * Traverses the directory |dirname| and returns all of the files it contains. 1736 + * @param dirname full path without trailing '/'. 1737 + */ 1738 + +// NOLINTNEXTLINE(readability-identifier-naming)` 1739 + std::vector<std::string> ReadFileContentsImpl(const std::string& dirname); 1740 + 1741 + /** 1742 + @@ -23,6 +24,7 @@ std::vector<std::string> ReadFileContentsImpl(const std::string& dirname); 1743 + * @param filename the full path to the file. 1744 + * @param contents output location of the file content. 1745 + */ 1746 + -void ReadFileContentsImpl(quiche::QuicheStringPiece filename, std::string* contents); 1747 + +// NOLINTNEXTLINE(readability-identifier-naming) 1748 + +void ReadFileContentsImpl(absl::string_view filename, std::string* contents); 1749 + 1750 + } // namespace quic 1751 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_flags_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_flags_impl.h 1752 + index 872495f2d..d562bb1a4 100644 1753 + --- a/source/extensions/quic_listeners/quiche/platform/quic_flags_impl.h 1754 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_flags_impl.h 1755 + @@ -15,16 +15,16 @@ 1756 + #define GetQuicFlagImpl(flag) (quiche::flag)->value() 1757 + 1758 + // |flag| is the global flag variable, which is a pointer to TypedFlag<type>. 1759 + -#define SetQuicFlagImpl(flag, value) (quiche::flag)->SetValue(value) 1760 + +#define SetQuicFlagImpl(flag, value) (quiche::flag)->setValue(value) 1761 + 1762 + #define GetQuicReloadableFlagImpl(flag) quiche::FLAGS_quic_reloadable_flag_##flag->value() 1763 + 1764 + #define SetQuicReloadableFlagImpl(flag, value) \ 1765 + - quiche::FLAGS_quic_reloadable_flag_##flag->SetValue(value) 1766 + + quiche::FLAGS_quic_reloadable_flag_##flag->setValue(value) 1767 + 1768 + #define GetQuicRestartFlagImpl(flag) quiche::FLAGS_quic_restart_flag_##flag->value() 1769 + 1770 + -#define SetQuicRestartFlagImpl(flag, value) quiche::FLAGS_quic_restart_flag_##flag->SetValue(value) 1771 + +#define SetQuicRestartFlagImpl(flag, value) quiche::FLAGS_quic_restart_flag_##flag->setValue(value) 1772 + 1773 + // Not wired into command-line parsing. 1774 + #define DEFINE_QUIC_COMMAND_LINE_FLAG_IMPL(type, flag, value, help) \ 1775 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_hostname_utils_impl.cc b/source/extensions/quic_listeners/quiche/platform/quic_hostname_utils_impl.cc 1776 + index bcbafb566..75849611d 100644 1777 + --- a/source/extensions/quic_listeners/quiche/platform/quic_hostname_utils_impl.cc 1778 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_hostname_utils_impl.cc 1779 + @@ -19,7 +19,8 @@ 1780 + namespace quic { 1781 + 1782 + // static 1783 + -bool QuicHostnameUtilsImpl::IsValidSNI(quiche::QuicheStringPiece sni) { 1784 + +// NOLINTNEXTLINE(readability-identifier-naming) 1785 + +bool QuicHostnameUtilsImpl::IsValidSNI(absl::string_view sni) { 1786 + // TODO(wub): Implement it on top of GoogleUrl, once it is available. 1787 + 1788 + return sni.find_last_of('.') != std::string::npos && 1789 + @@ -27,7 +28,8 @@ bool QuicHostnameUtilsImpl::IsValidSNI(quiche::QuicheStringPiece sni) { 1790 + } 1791 + 1792 + // static 1793 + -std::string QuicHostnameUtilsImpl::NormalizeHostname(quiche::QuicheStringPiece hostname) { 1794 + +// NOLINTNEXTLINE(readability-identifier-naming) 1795 + +std::string QuicHostnameUtilsImpl::NormalizeHostname(absl::string_view hostname) { 1796 + // TODO(wub): Implement it on top of GoogleUrl, once it is available. 1797 + std::string host = absl::AsciiStrToLower(hostname); 1798 + 1799 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_hostname_utils_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_hostname_utils_impl.h 1800 + index 2b7ed4357..67cd787d0 100644 1801 + --- a/source/extensions/quic_listeners/quiche/platform/quic_hostname_utils_impl.h 1802 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_hostname_utils_impl.h 1803 + @@ -6,7 +6,7 @@ 1804 + // consumed or referenced directly by other Envoy code. It serves purely as a 1805 + // porting layer for QUICHE. 1806 + 1807 + -#include "quiche/common/platform/api/quiche_string_piece.h" 1808 + +#include "absl/strings/string_view.h" 1809 + #include "quiche/quic/platform/api/quic_export.h" 1810 + 1811 + namespace quic { 1812 + @@ -18,7 +18,8 @@ public: 1813 + // (2) check that the hostname contains valid characters only; and 1814 + // (3) contains at least one dot. 1815 + // NOTE(wub): Only (3) is implemented for now. 1816 + - static bool IsValidSNI(quiche::QuicheStringPiece sni); 1817 + + // NOLINTNEXTLINE(readability-identifier-naming) 1818 + + static bool IsValidSNI(absl::string_view sni); 1819 + 1820 + // Normalize a hostname: 1821 + // (1) Canonicalize it, similar to what Chromium does in 1822 + @@ -27,7 +28,8 @@ public: 1823 + // (3) Remove the trailing '.'. 1824 + // WARNING: May mutate |hostname| in place. 1825 + // NOTE(wub): Only (2) and (3) are implemented for now. 1826 + - static std::string NormalizeHostname(quiche::QuicheStringPiece hostname); 1827 + + // NOLINTNEXTLINE(readability-identifier-naming) 1828 + + static std::string NormalizeHostname(absl::string_view hostname); 1829 + 1830 + private: 1831 + QuicHostnameUtilsImpl() = delete; 1832 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_macros_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_macros_impl.h 1833 + deleted file mode 100644 1834 + index b8b70a042..000000000 1835 + --- a/source/extensions/quic_listeners/quiche/platform/quic_macros_impl.h 1836 + +++ /dev/null 1837 + @@ -1,13 +0,0 @@ 1838 + -#pragma once 1839 + - 1840 + -// NOLINT(namespace-envoy) 1841 + - 1842 + -// This file is part of the QUICHE platform implementation, and is not to be 1843 + -// consumed or referenced directly by other Envoy code. It serves purely as a 1844 + -// porting layer for QUICHE. 1845 + - 1846 + -#include "absl/base/attributes.h" 1847 + - 1848 + -#define QUIC_MUST_USE_RESULT_IMPL ABSL_MUST_USE_RESULT 1849 + -#define QUIC_UNUSED_IMPL ABSL_ATTRIBUTE_UNUSED 1850 + -#define QUIC_CONST_INIT_IMPL ABSL_CONST_INIT 1851 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.cc b/source/extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.cc 1852 + index c2eb527d6..9e46c37df 100644 1853 + --- a/source/extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.cc 1854 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.cc 1855 + @@ -10,7 +10,8 @@ 1856 + 1857 + namespace quic { 1858 + 1859 + -quiche::QuicheStringPiece QuicMemSliceSpanImpl::GetData(size_t index) { 1860 + +// NOLINTNEXTLINE(readability-identifier-naming) 1861 + +absl::string_view QuicMemSliceSpanImpl::GetData(size_t index) { 1862 + Envoy::Buffer::RawSliceVector slices = buffer_->getRawSlices(/*max_slices=*/index + 1); 1863 + ASSERT(slices.size() > index); 1864 + return {reinterpret_cast<char*>(slices[index].mem_), slices[index].len_}; 1865 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.h 1866 + index 1824fb8d1..ef40e6387 100644 1867 + --- a/source/extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.h 1868 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.h 1869 + @@ -9,7 +9,7 @@ 1870 + #include "envoy/buffer/buffer.h" 1871 + 1872 + #include "absl/container/fixed_array.h" 1873 + -#include "quiche/common/platform/api/quiche_string_piece.h" 1874 + +#include "absl/strings/string_view.h" 1875 + #include "quiche/quic/core/quic_types.h" 1876 + #include "quiche/quic/platform/api/quic_mem_slice.h" 1877 + 1878 + @@ -43,9 +43,13 @@ public: 1879 + } 1880 + 1881 + // QuicMemSliceSpan 1882 + - quiche::QuicheStringPiece GetData(size_t index); 1883 + + // NOLINTNEXTLINE(readability-identifier-naming) 1884 + + absl::string_view GetData(size_t index); 1885 + + // NOLINTNEXTLINE(readability-identifier-naming) 1886 + QuicByteCount total_length() { return buffer_->length(); }; 1887 + + // NOLINTNEXTLINE(readability-identifier-naming) 1888 + size_t NumSlices() { return buffer_->getRawSlices().size(); } 1889 + + // NOLINTNEXTLINE(readability-identifier-naming) 1890 + template <typename ConsumeFunction> QuicByteCount ConsumeAll(ConsumeFunction consume); 1891 + bool empty() const { return buffer_->length() == 0; } 1892 + 1893 + @@ -54,6 +58,7 @@ private: 1894 + }; 1895 + 1896 + template <typename ConsumeFunction> 1897 + +// NOLINTNEXTLINE(readability-identifier-naming) 1898 + QuicByteCount QuicMemSliceSpanImpl::ConsumeAll(ConsumeFunction consume) { 1899 + size_t saved_length = 0; 1900 + for (auto& slice : buffer_->getRawSlices()) { 1901 + diff --git a/source/extensions/quic_listeners/quiche/platform/quiche_ptr_util_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_testvalue_impl.h 1902 + similarity index 52% 1903 + rename from source/extensions/quic_listeners/quiche/platform/quiche_ptr_util_impl.h 1904 + rename to source/extensions/quic_listeners/quiche/platform/quic_testvalue_impl.h 1905 + index aaebe5d5c..4b0201c35 100644 1906 + --- a/source/extensions/quic_listeners/quiche/platform/quiche_ptr_util_impl.h 1907 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_testvalue_impl.h 1908 + @@ -6,12 +6,11 @@ 1909 + // consumed or referenced directly by other Envoy code. It serves purely as a 1910 + // porting layer for QUICHE. 1911 + 1912 + -#include "absl/memory/memory.h" 1913 + +#include "absl/strings/string_view.h" 1914 + 1915 + -namespace quiche { 1916 + +namespace quic { 1917 + 1918 + -template <typename T> std::unique_ptr<T> QuicheWrapUniqueImpl(T* ptr) { 1919 + - return absl::WrapUnique<T>(ptr); 1920 + -} 1921 + +// NOLINTNEXTLINE(readability-identifier-naming) 1922 + +template <class T> void AdjustTestValueImpl(absl::string_view /*label*/, T* /*var*/) {} 1923 + 1924 + -} // namespace quiche 1925 + +} // namespace quic 1926 + diff --git a/source/extensions/quic_listeners/quiche/platform/quic_udp_socket_platform_impl.h b/source/extensions/quic_listeners/quiche/platform/quic_udp_socket_platform_impl.h 1927 + index 248cfc193..1e88abe46 100644 1928 + --- a/source/extensions/quic_listeners/quiche/platform/quic_udp_socket_platform_impl.h 1929 + +++ b/source/extensions/quic_listeners/quiche/platform/quic_udp_socket_platform_impl.h 1930 + @@ -19,4 +19,7 @@ inline bool GetGooglePacketHeadersFromControlMessageImpl(struct ::cmsghdr* /*cms 1931 + return false; 1932 + } 1933 + 1934 + +// NOLINTNEXTLINE(readability-identifier-naming) 1935 + +inline void SetGoogleSocketOptionsImpl(int /*fd*/) {} 1936 + + 1937 + } // namespace quic 1938 + diff --git a/source/extensions/quic_listeners/quiche/platform/quiche_arraysize_impl.h b/source/extensions/quic_listeners/quiche/platform/quiche_arraysize_impl.h 1939 + deleted file mode 100644 1940 + index 7a23b53da..000000000 1941 + --- a/source/extensions/quic_listeners/quiche/platform/quiche_arraysize_impl.h 1942 + +++ /dev/null 1943 + @@ -1,11 +0,0 @@ 1944 + -#pragma once 1945 + - 1946 + -#include "absl/base/macros.h" 1947 + - 1948 + -// NOLINT(namespace-envoy) 1949 + - 1950 + -// This file is part of the QUICHE platform implementation, and is not to be 1951 + -// consumed or referenced directly by other Envoy code. It serves purely as a 1952 + -// porting layer for QUICHE. 1953 + - 1954 + -#define QUICHE_ARRAYSIZE_IMPL(array) ABSL_ARRAYSIZE(array) 1955 + diff --git a/source/extensions/quic_listeners/quiche/platform/quiche_optional_impl.h b/source/extensions/quic_listeners/quiche/platform/quiche_optional_impl.h 1956 + deleted file mode 100644 1957 + index f8b2b6c08..000000000 1958 + --- a/source/extensions/quic_listeners/quiche/platform/quiche_optional_impl.h 1959 + +++ /dev/null 1960 + @@ -1,17 +0,0 @@ 1961 + -#pragma once 1962 + - 1963 + -#include "absl/types/optional.h" 1964 + - 1965 + -// NOLINT(namespace-envoy) 1966 + - 1967 + -// This file is part of the QUICHE platform implementation, and is not to be 1968 + -// consumed or referenced directly by other Envoy code. It serves purely as a 1969 + -// porting layer for QUICHE. 1970 + - 1971 + -namespace quiche { 1972 + - 1973 + -template <typename T> using QuicheOptionalImpl = absl::optional<T>; 1974 + - 1975 + -#define QUICHE_NULLOPT_IMPL absl::nullopt 1976 + - 1977 + -} // namespace quiche 1978 + diff --git a/source/extensions/quic_listeners/quiche/platform/quiche_text_utils_impl.h b/source/extensions/quic_listeners/quiche/platform/quiche_text_utils_impl.h 1979 + index 3a6d1a393..7b87c1cd6 100644 1980 + --- a/source/extensions/quic_listeners/quiche/platform/quiche_text_utils_impl.h 1981 + +++ b/source/extensions/quic_listeners/quiche/platform/quiche_text_utils_impl.h 1982 + @@ -2,7 +2,6 @@ 1983 + 1984 + #include "common/common/base64.h" 1985 + 1986 + -#include "extensions/quic_listeners/quiche/platform/quiche_optional_impl.h" 1987 + #include "extensions/quic_listeners/quiche/platform/quiche_string_piece_impl.h" 1988 + #include "extensions/quic_listeners/quiche/platform/string_utils.h" 1989 + 1990 + @@ -13,6 +12,7 @@ 1991 + #include "absl/strings/str_cat.h" 1992 + #include "absl/strings/str_format.h" 1993 + #include "absl/strings/str_split.h" 1994 + +#include "absl/types/optional.h" 1995 + 1996 + // NOLINT(namespace-envoy) 1997 + 1998 + @@ -25,58 +25,16 @@ namespace quiche { 1999 + class QuicheTextUtilsImpl { 2000 + public: 2001 + // NOLINTNEXTLINE(readability-identifier-naming) 2002 + - static bool StartsWith(QuicheStringPieceImpl data, QuicheStringPieceImpl prefix) { 2003 + - return absl::StartsWith(data, prefix); 2004 + - } 2005 + - 2006 + - // NOLINTNEXTLINE(readability-identifier-naming) 2007 + - static bool EndsWith(QuicheStringPieceImpl data, QuicheStringPieceImpl suffix) { 2008 + - return absl::EndsWith(data, suffix); 2009 + - } 2010 + - 2011 + - // NOLINTNEXTLINE(readability-identifier-naming) 2012 + - static bool EndsWithIgnoreCase(QuicheStringPieceImpl data, QuicheStringPieceImpl suffix) { 2013 + - return absl::EndsWithIgnoreCase(data, suffix); 2014 + - } 2015 + - 2016 + - // NOLINTNEXTLINE(readability-identifier-naming) 2017 + - static std::string ToLower(QuicheStringPieceImpl data) { return absl::AsciiStrToLower(data); } 2018 + + static std::string ToLower(absl::string_view data) { return absl::AsciiStrToLower(data); } 2019 + 2020 + // NOLINTNEXTLINE(readability-identifier-naming) 2021 + - static void RemoveLeadingAndTrailingWhitespace(QuicheStringPieceImpl* data) { 2022 + + static void RemoveLeadingAndTrailingWhitespace(absl::string_view* data) { 2023 + *data = absl::StripAsciiWhitespace(*data); 2024 + } 2025 + 2026 + - // NOLINTNEXTLINE(readability-identifier-naming) 2027 + - static bool StringToUint64(QuicheStringPieceImpl in, uint64_t* out) { 2028 + - return absl::SimpleAtoi(in, out); 2029 + - } 2030 + - 2031 + - // NOLINTNEXTLINE(readability-identifier-naming) 2032 + - static bool StringToInt(QuicheStringPieceImpl in, int* out) { return absl::SimpleAtoi(in, out); } 2033 + - 2034 + - // NOLINTNEXTLINE(readability-identifier-naming) 2035 + - static bool StringToUint32(QuicheStringPieceImpl in, uint32_t* out) { 2036 + - return absl::SimpleAtoi(in, out); 2037 + - } 2038 + - 2039 + - // NOLINTNEXTLINE(readability-identifier-naming) 2040 + - static bool StringToSizeT(QuicheStringPieceImpl in, size_t* out) { 2041 + - return absl::SimpleAtoi(in, out); 2042 + - } 2043 + - 2044 + - // NOLINTNEXTLINE(readability-identifier-naming) 2045 + - static std::string Uint64ToString(uint64_t in) { return absl::StrCat(in); } 2046 + - 2047 + - // NOLINTNEXTLINE(readability-identifier-naming) 2048 + - static std::string HexEncode(QuicheStringPieceImpl data) { return absl::BytesToHexString(data); } 2049 + - 2050 + // NOLINTNEXTLINE(readability-identifier-naming) 2051 + static std::string Hex(uint32_t v) { return absl::StrCat(absl::Hex(v)); } 2052 + 2053 + - // NOLINTNEXTLINE(readability-identifier-naming) 2054 + - static std::string HexDecode(QuicheStringPieceImpl data) { return absl::HexStringToBytes(data); } 2055 + - 2056 + // NOLINTNEXTLINE(readability-identifier-naming) 2057 + static void Base64Encode(const uint8_t* data, size_t data_len, std::string* output) { 2058 + *output = 2059 + @@ -84,27 +42,28 @@ public: 2060 + } 2061 + 2062 + // NOLINTNEXTLINE(readability-identifier-naming) 2063 + - static QuicheOptionalImpl<std::string> Base64Decode(QuicheStringPieceImpl input) { 2064 + + static absl::optional<std::string> Base64Decode(absl::string_view input) { 2065 + return Envoy::Base64::decodeWithoutPadding(input); 2066 + } 2067 + 2068 + // NOLINTNEXTLINE(readability-identifier-naming) 2069 + - static std::string HexDump(QuicheStringPieceImpl binary_data) { 2070 + - return quiche::HexDump(binary_data); 2071 + - } 2072 + + static std::string Uint64ToString(uint64_t in) { return absl::StrCat(in); } 2073 + + 2074 + + // NOLINTNEXTLINE(readability-identifier-naming) 2075 + + static std::string HexDump(absl::string_view binary_data) { return quiche::HexDump(binary_data); } 2076 + 2077 + // NOLINTNEXTLINE(readability-identifier-naming) 2078 + - static bool ContainsUpperCase(QuicheStringPieceImpl data) { 2079 + + static bool ContainsUpperCase(absl::string_view data) { 2080 + return std::any_of(data.begin(), data.end(), absl::ascii_isupper); 2081 + } 2082 + 2083 + // NOLINTNEXTLINE(readability-identifier-naming) 2084 + - static bool IsAllDigits(QuicheStringPieceImpl data) { 2085 + + static bool IsAllDigits(absl::string_view data) { 2086 + return std::all_of(data.begin(), data.end(), absl::ascii_isdigit); 2087 + } 2088 + 2089 + // NOLINTNEXTLINE(readability-identifier-naming) 2090 + - static std::vector<QuicheStringPieceImpl> Split(QuicheStringPieceImpl data, char delim) { 2091 + + static std::vector<absl::string_view> Split(absl::string_view data, char delim) { 2092 + return absl::StrSplit(data, delim); 2093 + } 2094 + }; 2095 + diff --git a/source/extensions/quic_listeners/quiche/platform/quiche_time_utils_impl.cc b/source/extensions/quic_listeners/quiche/platform/quiche_time_utils_impl.cc 2096 + index 3260eafee..5387e0598 100644 2097 + --- a/source/extensions/quic_listeners/quiche/platform/quiche_time_utils_impl.cc 2098 + +++ b/source/extensions/quic_listeners/quiche/platform/quiche_time_utils_impl.cc 2099 + @@ -9,7 +9,7 @@ 2100 + namespace quiche { 2101 + 2102 + namespace { 2103 + -QuicheOptional<int64_t> quicheUtcDateTimeToUnixSecondsInner(int year, int month, int day, int hour, 2104 + +absl::optional<int64_t> quicheUtcDateTimeToUnixSecondsInner(int year, int month, int day, int hour, 2105 + int minute, int second) { 2106 + const absl::CivilSecond civil_time(year, month, day, hour, minute, second); 2107 + if (second != 60 && (civil_time.year() != year || civil_time.month() != month || 2108 + @@ -24,7 +24,7 @@ QuicheOptional<int64_t> quicheUtcDateTimeToUnixSecondsInner(int year, int month, 2109 + } // namespace 2110 + 2111 + // NOLINTNEXTLINE(readability-identifier-naming) 2112 + -QuicheOptional<int64_t> QuicheUtcDateTimeToUnixSecondsImpl(int year, int month, int day, int hour, 2113 + +absl::optional<int64_t> QuicheUtcDateTimeToUnixSecondsImpl(int year, int month, int day, int hour, 2114 + int minute, int second) { 2115 + // Handle leap seconds without letting any other irregularities happen. 2116 + if (second == 60) { 2117 + diff --git a/source/extensions/quic_listeners/quiche/platform/quiche_time_utils_impl.h b/source/extensions/quic_listeners/quiche/platform/quiche_time_utils_impl.h 2118 + index a1b70b70a..5e2ef7956 100644 2119 + --- a/source/extensions/quic_listeners/quiche/platform/quiche_time_utils_impl.h 2120 + +++ b/source/extensions/quic_listeners/quiche/platform/quiche_time_utils_impl.h 2121 + @@ -10,12 +10,12 @@ 2122 + 2123 + #include "absl/time/civil_time.h" 2124 + #include "absl/time/time.h" 2125 + -#include "quiche/common/platform/api/quiche_optional.h" 2126 + +#include "absl/types/optional.h" 2127 + 2128 + namespace quiche { 2129 + 2130 + // NOLINTNEXTLINE(readability-identifier-naming) 2131 + -QuicheOptional<int64_t> QuicheUtcDateTimeToUnixSecondsImpl(int year, int month, int day, int hour, 2132 + +absl::optional<int64_t> QuicheUtcDateTimeToUnixSecondsImpl(int year, int month, int day, int hour, 2133 + int minute, int second); 2134 + 2135 + } // namespace quiche 2136 + diff --git a/source/extensions/quic_listeners/quiche/platform/spdy_endianness_util_impl.h b/source/extensions/quic_listeners/quiche/platform/spdy_endianness_util_impl.h 2137 + deleted file mode 100644 2138 + index 737b81ee2..000000000 2139 + --- a/source/extensions/quic_listeners/quiche/platform/spdy_endianness_util_impl.h 2140 + +++ /dev/null 2141 + @@ -1,29 +0,0 @@ 2142 + -#pragma once 2143 + - 2144 + -#include <cstdint> 2145 + - 2146 + -#include "envoy/common/platform.h" 2147 + - 2148 + -// NOLINT(namespace-envoy) 2149 + - 2150 + -// This file is part of the QUICHE platform implementation, and is not to be 2151 + -// consumed or referenced directly by other Envoy code. It serves purely as a 2152 + -// porting layer for QUICHE. 2153 + - 2154 + -namespace spdy { 2155 + - 2156 + -inline uint16_t SpdyNetToHost16Impl(uint16_t x) { return ntohs(x); } 2157 + - 2158 + -inline uint32_t SpdyNetToHost32Impl(uint32_t x) { return ntohl(x); } 2159 + - 2160 + -// TODO: implement 2161 + -inline uint64_t SpdyNetToHost64Impl(uint64_t /*x*/) { return 0; } 2162 + - 2163 + -inline uint16_t SpdyHostToNet16Impl(uint16_t x) { return htons(x); } 2164 + - 2165 + -inline uint32_t SpdyHostToNet32Impl(uint32_t x) { return htonl(x); } 2166 + - 2167 + -// TODO: implement 2168 + -inline uint64_t SpdyHostToNet64Impl(uint64_t /*x*/) { return 0; } 2169 + - 2170 + -} // namespace spdy 2171 + diff --git a/source/extensions/quic_listeners/quiche/platform/spdy_flags_impl.h b/source/extensions/quic_listeners/quiche/platform/spdy_flags_impl.h 2172 + index a3cbd680f..833562fab 100644 2173 + --- a/source/extensions/quic_listeners/quiche/platform/spdy_flags_impl.h 2174 + +++ b/source/extensions/quic_listeners/quiche/platform/spdy_flags_impl.h 2175 + @@ -8,9 +8,9 @@ 2176 + 2177 + #include "extensions/quic_listeners/quiche/platform/flags_impl.h" 2178 + 2179 + -#define GetSpdyReloadableFlagImpl(flag) quiche::FLAGS_spdy_reloadable_flag_##flag->value() 2180 + +#define GetSpdyReloadableFlagImpl(flag) quiche::FLAGS_quic_reloadable_flag_##flag->value() 2181 + 2182 + -#define GetSpdyRestartFlagImpl(flag) quiche::FLAGS_spdy_restart_flag_##flag->value() 2183 + +#define GetSpdyRestartFlagImpl(flag) quiche::FLAGS_quic_restart_flag_##flag->value() 2184 + 2185 + #define SPDY_CODE_COUNT_N_IMPL(flag, instance, total) \ 2186 + do { \ 2187 + diff --git a/source/extensions/quic_listeners/quiche/platform/spdy_string_utils_impl.h b/source/extensions/quic_listeners/quiche/platform/spdy_string_utils_impl.h 2188 + index 41fa3cad8..4b01b2dbd 100644 2189 + --- a/source/extensions/quic_listeners/quiche/platform/spdy_string_utils_impl.h 2190 + +++ b/source/extensions/quic_listeners/quiche/platform/spdy_string_utils_impl.h 2191 + @@ -50,7 +50,7 @@ inline std::string SpdyHexEncodeUInt32AndTrimImpl(uint32_t data) { 2192 + inline std::string SpdyHexDumpImpl(absl::string_view data) { return quiche::HexDump(data); } 2193 + 2194 + struct SpdyStringPieceCaseHashImpl { 2195 + - size_t operator()(quiche::QuicheStringPiece data) const { 2196 + + size_t operator()(absl::string_view data) const { 2197 + std::string lower = absl::AsciiStrToLower(data); 2198 + return absl::Hash<std::string>()(lower); 2199 + } 2200 + diff --git a/source/extensions/quic_listeners/quiche/spdy_server_push_utils_for_envoy.cc b/source/extensions/quic_listeners/quiche/spdy_server_push_utils_for_envoy.cc 2201 + index 3bd0bc295..5ac5738c4 100644 2202 + --- a/source/extensions/quic_listeners/quiche/spdy_server_push_utils_for_envoy.cc 2203 + +++ b/source/extensions/quic_listeners/quiche/spdy_server_push_utils_for_envoy.cc 2204 + @@ -12,25 +12,29 @@ using spdy::SpdyHeaderBlock; 2205 + namespace quic { 2206 + 2207 + // static 2208 + +// NOLINTNEXTLINE(readability-identifier-naming) 2209 + std::string SpdyServerPushUtils::GetPromisedUrlFromHeaders(const SpdyHeaderBlock& /*headers*/) { 2210 + NOT_IMPLEMENTED_GCOVR_EXCL_LINE; 2211 + } 2212 + 2213 + // static 2214 + std::string 2215 + +// NOLINTNEXTLINE(readability-identifier-naming) 2216 + SpdyServerPushUtils::GetPromisedHostNameFromHeaders(const SpdyHeaderBlock& /*headers*/) { 2217 + NOT_IMPLEMENTED_GCOVR_EXCL_LINE; 2218 + } 2219 + 2220 + // static 2221 + +// NOLINTNEXTLINE(readability-identifier-naming) 2222 + bool SpdyServerPushUtils::PromisedUrlIsValid(const SpdyHeaderBlock& /*headers*/) { 2223 + NOT_IMPLEMENTED_GCOVR_EXCL_LINE; 2224 + } 2225 + 2226 + // static 2227 + -std::string SpdyServerPushUtils::GetPushPromiseUrl(quiche::QuicheStringPiece /*scheme*/, 2228 + - quiche::QuicheStringPiece /*authority*/, 2229 + - quiche::QuicheStringPiece /*path*/) { 2230 + +// NOLINTNEXTLINE(readability-identifier-naming) 2231 + +std::string SpdyServerPushUtils::GetPushPromiseUrl(absl::string_view /*scheme*/, 2232 + + absl::string_view /*authority*/, 2233 + + absl::string_view /*path*/) { 2234 + NOT_IMPLEMENTED_GCOVR_EXCL_LINE; 2235 + } 2236 + 2237 + diff --git a/test/extensions/quic_listeners/quiche/envoy_quic_client_session_test.cc b/test/extensions/quic_listeners/quiche/envoy_quic_client_session_test.cc 2238 + index e2d90d916..8fa7d9fe9 100644 2239 + --- a/test/extensions/quic_listeners/quiche/envoy_quic_client_session_test.cc 2240 + +++ b/test/extensions/quic_listeners/quiche/envoy_quic_client_session_test.cc 2241 + @@ -49,9 +49,9 @@ public: 2242 + Network::ConnectionSocketPtr&& connection_socket) 2243 + : EnvoyQuicClientConnection(server_connection_id, helper, alarm_factory, &writer, false, 2244 + supported_versions, dispatcher, std::move(connection_socket)) { 2245 + - SetDefaultEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE); 2246 + SetEncrypter(quic::ENCRYPTION_FORWARD_SECURE, 2247 + std::make_unique<quic::NullEncrypter>(quic::Perspective::IS_CLIENT)); 2248 + + SetDefaultEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE); 2249 + } 2250 + 2251 + MOCK_METHOD(void, SendConnectionClosePacket, (quic::QuicErrorCode, const std::string&)); 2252 + diff --git a/test/extensions/quic_listeners/quiche/envoy_quic_client_stream_test.cc b/test/extensions/quic_listeners/quiche/envoy_quic_client_stream_test.cc 2253 + index 98359c618..f3b02f4cc 100644 2254 + --- a/test/extensions/quic_listeners/quiche/envoy_quic_client_stream_test.cc 2255 + +++ b/test/extensions/quic_listeners/quiche/envoy_quic_client_stream_test.cc 2256 + @@ -48,11 +48,11 @@ public: 2257 + quic_session_.ActivateStream(std::unique_ptr<EnvoyQuicClientStream>(quic_stream_)); 2258 + EXPECT_CALL(quic_session_, ShouldYield(_)).WillRepeatedly(testing::Return(false)); 2259 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2260 + - .WillRepeatedly(Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2261 + - quic::StreamSendingState state, bool, 2262 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2263 + - return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2264 + - })); 2265 + + .WillRepeatedly( 2266 + + Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2267 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2268 + + return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2269 + + })); 2270 + EXPECT_CALL(writer_, WritePacket(_, _, _, _, _)) 2271 + .WillRepeatedly(Invoke([](const char*, size_t buf_len, const quic::QuicIpAddress&, 2272 + const quic::QuicSocketAddress&, quic::PerPacketOptions*) { 2273 + @@ -146,7 +146,7 @@ TEST_P(EnvoyQuicClientStreamTest, PostRequestAndResponse) { 2274 + std::unique_ptr<char[]> data_buffer; 2275 + quic::QuicByteCount data_frame_header_length = 2276 + quic::HttpEncoder::SerializeDataFrameHeader(response_body_.length(), &data_buffer); 2277 + - quiche::QuicheStringPiece data_frame_header(data_buffer.get(), data_frame_header_length); 2278 + + absl::string_view data_frame_header(data_buffer.get(), data_frame_header_length); 2279 + data = absl::StrCat(data_frame_header, response_body_); 2280 + } 2281 + quic::QuicStreamFrame frame(stream_id_, false, 0, data); 2282 + @@ -184,7 +184,7 @@ TEST_P(EnvoyQuicClientStreamTest, OutOfOrderTrailers) { 2283 + std::unique_ptr<char[]> data_buffer; 2284 + quic::QuicByteCount data_frame_header_length = 2285 + quic::HttpEncoder::SerializeDataFrameHeader(response_body_.length(), &data_buffer); 2286 + - quiche::QuicheStringPiece data_frame_header(data_buffer.get(), data_frame_header_length); 2287 + + absl::string_view data_frame_header(data_buffer.get(), data_frame_header_length); 2288 + data = absl::StrCat(data_frame_header, response_body_); 2289 + } 2290 + quic::QuicStreamFrame frame(stream_id_, false, 0, data); 2291 + @@ -301,11 +301,11 @@ TEST_P(EnvoyQuicClientStreamTest, HeadersContributeToWatermarkIquic) { 2292 + // Unblock writing now, and this will write out 16kB data and cause stream to 2293 + // be blocked by the flow control limit. 2294 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2295 + - .WillOnce(Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2296 + - quic::StreamSendingState state, bool, 2297 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2298 + - return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2299 + - })); 2300 + + .WillOnce( 2301 + + Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2302 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2303 + + return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2304 + + })); 2305 + EXPECT_CALL(stream_callbacks_, onBelowWriteBufferLowWatermark()); 2306 + quic_session_.OnCanWrite(); 2307 + EXPECT_TRUE(quic_stream_->IsFlowControlBlocked()); 2308 + @@ -315,20 +315,20 @@ TEST_P(EnvoyQuicClientStreamTest, HeadersContributeToWatermarkIquic) { 2309 + 32 * 1024); 2310 + quic_stream_->OnWindowUpdateFrame(window_update1); 2311 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2312 + - .WillOnce(Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2313 + - quic::StreamSendingState state, bool, 2314 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2315 + - return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2316 + - })); 2317 + + .WillOnce( 2318 + + Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2319 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2320 + + return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2321 + + })); 2322 + quic_session_.OnCanWrite(); 2323 + // No data should be buffered at this point. 2324 + 2325 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2326 + - .WillOnce(Invoke([](quic::QuicStreamId, size_t, quic::QuicStreamOffset, 2327 + - quic::StreamSendingState state, bool, 2328 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2329 + - return quic::QuicConsumedData{0u, state != quic::NO_FIN}; 2330 + - })); 2331 + + .WillOnce( 2332 + + Invoke([](quic::QuicStreamId, size_t, quic::QuicStreamOffset, 2333 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2334 + + return quic::QuicConsumedData{0u, state != quic::NO_FIN}; 2335 + + })); 2336 + // Send more data. If watermark bytes counting were not cleared in previous 2337 + // OnCanWrite, this write would have caused the stream to exceed its high watermark. 2338 + std::string request1(16 * 1024 - 3, 'a'); 2339 + diff --git a/test/extensions/quic_listeners/quiche/envoy_quic_proof_source_test.cc b/test/extensions/quic_listeners/quiche/envoy_quic_proof_source_test.cc 2340 + index cbf66f511..8a493a8e8 100644 2341 + --- a/test/extensions/quic_listeners/quiche/envoy_quic_proof_source_test.cc 2342 + +++ b/test/extensions/quic_listeners/quiche/envoy_quic_proof_source_test.cc 2343 + @@ -25,7 +25,7 @@ namespace Quic { 2344 + class TestGetProofCallback : public quic::ProofSource::Callback { 2345 + public: 2346 + TestGetProofCallback(bool& called, bool should_succeed, const std::string& server_config, 2347 + - quic::QuicTransportVersion& version, quiche::QuicheStringPiece chlo_hash, 2348 + + quic::QuicTransportVersion& version, absl::string_view chlo_hash, 2349 + Network::FilterChain& filter_chain) 2350 + : called_(called), should_succeed_(should_succeed), server_config_(server_config), 2351 + version_(version), chlo_hash_(chlo_hash), expected_filter_chain_(filter_chain) { 2352 + @@ -100,7 +100,7 @@ private: 2353 + bool should_succeed_; 2354 + const std::string& server_config_; 2355 + const quic::QuicTransportVersion& version_; 2356 + - quiche::QuicheStringPiece chlo_hash_; 2357 + + absl::string_view chlo_hash_; 2358 + Network::FilterChain& expected_filter_chain_; 2359 + NiceMock<Stats::MockStore> store_; 2360 + Event::GlobalTimeSystem time_system_; 2361 + @@ -178,7 +178,7 @@ protected: 2362 + quic::QuicSocketAddress server_address_; 2363 + quic::QuicSocketAddress client_address_; 2364 + quic::QuicTransportVersion version_{quic::QUIC_VERSION_UNSUPPORTED}; 2365 + - quiche::QuicheStringPiece chlo_hash_{"aaaaa"}; 2366 + + absl::string_view chlo_hash_{"aaaaa"}; 2367 + std::string server_config_{"Server Config"}; 2368 + std::string expected_certs_{quic::test::kTestCertificateChainPem}; 2369 + std::string pkey_{quic::test::kTestCertificatePrivateKeyPem}; 2370 + diff --git a/test/extensions/quic_listeners/quiche/envoy_quic_proof_verifier_test.cc b/test/extensions/quic_listeners/quiche/envoy_quic_proof_verifier_test.cc 2371 + index 4a1dfe144..9cdc169cd 100644 2372 + --- a/test/extensions/quic_listeners/quiche/envoy_quic_proof_verifier_test.cc 2373 + +++ b/test/extensions/quic_listeners/quiche/envoy_quic_proof_verifier_test.cc 2374 + @@ -163,7 +163,7 @@ TEST_F(EnvoyQuicProofVerifierTest, VerifyProofFailureEmptyCertChain) { 2375 + std::unique_ptr<quic::CertificateView> cert_view = 2376 + quic::CertificateView::ParseSingleCertificate(leaf_cert_); 2377 + quic::QuicTransportVersion version{quic::QUIC_VERSION_UNSUPPORTED}; 2378 + - quiche::QuicheStringPiece chlo_hash{"aaaaa"}; 2379 + + absl::string_view chlo_hash{"aaaaa"}; 2380 + std::string server_config{"Server Config"}; 2381 + const std::string ocsp_response; 2382 + const std::string cert_sct; 2383 + @@ -181,7 +181,7 @@ TEST_F(EnvoyQuicProofVerifierTest, VerifyProofFailureInvalidLeafCert) { 2384 + std::unique_ptr<quic::CertificateView> cert_view = 2385 + quic::CertificateView::ParseSingleCertificate(leaf_cert_); 2386 + quic::QuicTransportVersion version{quic::QUIC_VERSION_UNSUPPORTED}; 2387 + - quiche::QuicheStringPiece chlo_hash{"aaaaa"}; 2388 + + absl::string_view chlo_hash{"aaaaa"}; 2389 + std::string server_config{"Server Config"}; 2390 + const std::string ocsp_response; 2391 + const std::string cert_sct; 2392 + @@ -197,7 +197,7 @@ TEST_F(EnvoyQuicProofVerifierTest, VerifyProofFailureInvalidLeafCert) { 2393 + TEST_F(EnvoyQuicProofVerifierTest, VerifyProofFailureUnsupportedECKey) { 2394 + configCertVerificationDetails(true); 2395 + quic::QuicTransportVersion version{quic::QUIC_VERSION_UNSUPPORTED}; 2396 + - quiche::QuicheStringPiece chlo_hash{"aaaaa"}; 2397 + + absl::string_view chlo_hash{"aaaaa"}; 2398 + std::string server_config{"Server Config"}; 2399 + const std::string ocsp_response; 2400 + const std::string cert_sct; 2401 + @@ -236,7 +236,7 @@ TEST_F(EnvoyQuicProofVerifierTest, VerifyProofFailureInvalidSignature) { 2402 + std::unique_ptr<quic::CertificateView> cert_view = 2403 + quic::CertificateView::ParseSingleCertificate(leaf_cert_); 2404 + quic::QuicTransportVersion version{quic::QUIC_VERSION_UNSUPPORTED}; 2405 + - quiche::QuicheStringPiece chlo_hash{"aaaaa"}; 2406 + + absl::string_view chlo_hash{"aaaaa"}; 2407 + std::string server_config{"Server Config"}; 2408 + const std::string ocsp_response; 2409 + const std::string cert_sct; 2410 + diff --git a/test/extensions/quic_listeners/quiche/envoy_quic_server_session_test.cc b/test/extensions/quic_listeners/quiche/envoy_quic_server_session_test.cc 2411 + index 05307c6b9..4fc376857 100644 2412 + --- a/test/extensions/quic_listeners/quiche/envoy_quic_server_session_test.cc 2413 + +++ b/test/extensions/quic_listeners/quiche/envoy_quic_server_session_test.cc 2414 + @@ -61,6 +61,7 @@ public: 2415 + const quic::ParsedQuicVersionVector& supported_versions, 2416 + Network::Socket& listen_socket) 2417 + : EnvoyQuicServerConnection(quic::test::TestConnectionId(), 2418 + + quic::QuicSocketAddress(quic::QuicIpAddress::Any4(), 12345), 2419 + quic::QuicSocketAddress(quic::QuicIpAddress::Loopback4(), 12345), 2420 + helper, alarm_factory, &writer, /*owns_writer=*/false, 2421 + supported_versions, listen_socket) {} 2422 + @@ -201,10 +202,10 @@ public: 2423 + crypto_stream_ = test_crypto_stream; 2424 + } 2425 + quic::test::QuicServerSessionBasePeer::SetCryptoStream(&envoy_quic_session_, crypto_stream); 2426 + - quic_connection_->SetDefaultEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE); 2427 + quic_connection_->SetEncrypter( 2428 + quic::ENCRYPTION_FORWARD_SECURE, 2429 + std::make_unique<quic::NullEncrypter>(quic::Perspective::IS_SERVER)); 2430 + + quic_connection_->SetDefaultEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE); 2431 + } 2432 + 2433 + bool installReadFilter() { 2434 + diff --git a/test/extensions/quic_listeners/quiche/envoy_quic_server_stream_test.cc b/test/extensions/quic_listeners/quiche/envoy_quic_server_stream_test.cc 2435 + index c2fd31c6f..f602e2c9a 100644 2436 + --- a/test/extensions/quic_listeners/quiche/envoy_quic_server_stream_test.cc 2437 + +++ b/test/extensions/quic_listeners/quiche/envoy_quic_server_stream_test.cc 2438 + @@ -51,6 +51,7 @@ public: 2439 + POOL_GAUGE(listener_config_.listenerScope()), 2440 + POOL_HISTOGRAM(listener_config_.listenerScope()))}), 2441 + quic_connection_(quic::test::TestConnectionId(), 2442 + + quic::QuicSocketAddress(quic::QuicIpAddress::Any6(), 123), 2443 + quic::QuicSocketAddress(quic::QuicIpAddress::Any6(), 12345), 2444 + connection_helper_, alarm_factory_, &writer_, 2445 + /*owns_writer=*/false, {quic_version_}, *listener_config_.socket_), 2446 + @@ -66,11 +67,11 @@ public: 2447 + quic_session_.ActivateStream(std::unique_ptr<EnvoyQuicServerStream>(quic_stream_)); 2448 + EXPECT_CALL(quic_session_, ShouldYield(_)).WillRepeatedly(testing::Return(false)); 2449 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2450 + - .WillRepeatedly(Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2451 + - quic::StreamSendingState state, bool, 2452 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2453 + - return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2454 + - })); 2455 + + .WillRepeatedly( 2456 + + Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2457 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2458 + + return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2459 + + })); 2460 + EXPECT_CALL(writer_, WritePacket(_, _, _, _, _)) 2461 + .WillRepeatedly(Invoke([](const char*, size_t buf_len, const quic::QuicIpAddress&, 2462 + const quic::QuicSocketAddress&, quic::PerPacketOptions*) { 2463 + @@ -110,7 +111,7 @@ public: 2464 + std::unique_ptr<char[]> data_buffer; 2465 + quic::QuicByteCount data_frame_header_length = 2466 + quic::HttpEncoder::SerializeDataFrameHeader(body.length(), &data_buffer); 2467 + - quiche::QuicheStringPiece data_frame_header(data_buffer.get(), data_frame_header_length); 2468 + + absl::string_view data_frame_header(data_buffer.get(), data_frame_header_length); 2469 + data = absl::StrCat(data_frame_header, body); 2470 + } 2471 + return data; 2472 + @@ -397,11 +398,11 @@ TEST_P(EnvoyQuicServerStreamTest, HeadersContributeToWatermarkIquic) { 2473 + 2474 + // Make the stream blocked by congestion control. 2475 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2476 + - .WillOnce(Invoke([](quic::QuicStreamId, size_t /*write_length*/, quic::QuicStreamOffset, 2477 + - quic::StreamSendingState state, bool, 2478 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2479 + - return quic::QuicConsumedData{0u, state != quic::NO_FIN}; 2480 + - })); 2481 + + .WillOnce( 2482 + + Invoke([](quic::QuicStreamId, size_t /*write_length*/, quic::QuicStreamOffset, 2483 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2484 + + return quic::QuicConsumedData{0u, state != quic::NO_FIN}; 2485 + + })); 2486 + quic_stream_->encodeHeaders(response_headers_, /*end_stream=*/false); 2487 + 2488 + // Encode 16kB -10 bytes request body. Because the high watermark is 16KB, with previously 2489 + @@ -415,11 +416,11 @@ TEST_P(EnvoyQuicServerStreamTest, HeadersContributeToWatermarkIquic) { 2490 + // Unblock writing now, and this will write out 16kB data and cause stream to 2491 + // be blocked by the flow control limit. 2492 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2493 + - .WillOnce(Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2494 + - quic::StreamSendingState state, bool, 2495 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2496 + - return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2497 + - })); 2498 + + .WillOnce( 2499 + + Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2500 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2501 + + return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2502 + + })); 2503 + EXPECT_CALL(stream_callbacks_, onBelowWriteBufferLowWatermark()); 2504 + quic_session_.OnCanWrite(); 2505 + EXPECT_TRUE(quic_stream_->IsFlowControlBlocked()); 2506 + @@ -429,20 +430,20 @@ TEST_P(EnvoyQuicServerStreamTest, HeadersContributeToWatermarkIquic) { 2507 + 32 * 1024); 2508 + quic_stream_->OnWindowUpdateFrame(window_update1); 2509 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2510 + - .WillOnce(Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2511 + - quic::StreamSendingState state, bool, 2512 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2513 + - return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2514 + - })); 2515 + + .WillOnce( 2516 + + Invoke([](quic::QuicStreamId, size_t write_length, quic::QuicStreamOffset, 2517 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2518 + + return quic::QuicConsumedData{write_length, state != quic::NO_FIN}; 2519 + + })); 2520 + quic_session_.OnCanWrite(); 2521 + // No data should be buffered at this point. 2522 + 2523 + EXPECT_CALL(quic_session_, WritevData(_, _, _, _, _, _)) 2524 + - .WillRepeatedly(Invoke([](quic::QuicStreamId, size_t, quic::QuicStreamOffset, 2525 + - quic::StreamSendingState state, bool, 2526 + - quiche::QuicheOptional<quic::EncryptionLevel>) { 2527 + - return quic::QuicConsumedData{0u, state != quic::NO_FIN}; 2528 + - })); 2529 + + .WillRepeatedly( 2530 + + Invoke([](quic::QuicStreamId, size_t, quic::QuicStreamOffset, 2531 + + quic::StreamSendingState state, bool, absl::optional<quic::EncryptionLevel>) { 2532 + + return quic::QuicConsumedData{0u, state != quic::NO_FIN}; 2533 + + })); 2534 + // Send more data. If watermark bytes counting were not cleared in previous 2535 + // OnCanWrite, this write would have caused the stream to exceed its high watermark. 2536 + std::string response1(16 * 1024 - 3, 'a'); 2537 + diff --git a/test/extensions/quic_listeners/quiche/platform/BUILD b/test/extensions/quic_listeners/quiche/platform/BUILD 2538 + index 420e812b8..7dbb08d82 100644 2539 + --- a/test/extensions/quic_listeners/quiche/platform/BUILD 2540 + +++ b/test/extensions/quic_listeners/quiche/platform/BUILD 2541 + @@ -9,16 +9,6 @@ licenses(["notice"]) # Apache 2 2542 + 2543 + envoy_package() 2544 + 2545 + -envoy_cc_test( 2546 + - name = "quiche_platform_test", 2547 + - srcs = ["quiche_platform_test.cc"], 2548 + - external_deps = ["quiche_common_platform"], 2549 + - deps = [ 2550 + - "@com_googlesource_quiche//:quiche_common_platform", 2551 + - "@com_googlesource_quiche//:quiche_common_platform_endian", 2552 + - ], 2553 + -) 2554 + - 2555 + envoy_cc_test( 2556 + name = "http2_platform_test", 2557 + srcs = ["http2_platform_test.cc"], 2558 + @@ -63,7 +53,6 @@ envoy_cc_test( 2559 + "@com_googlesource_quiche//:quic_platform_mem_slice_span", 2560 + "@com_googlesource_quiche//:quic_platform_mem_slice_storage", 2561 + "@com_googlesource_quiche//:quic_platform_mock_log", 2562 + - "@com_googlesource_quiche//:quic_platform_port_utils", 2563 + "@com_googlesource_quiche//:quic_platform_sleep", 2564 + "@com_googlesource_quiche//:quic_platform_system_event_loop", 2565 + "@com_googlesource_quiche//:quic_platform_test", 2566 + @@ -150,17 +139,6 @@ envoy_cc_test_library( 2567 + deps = ["@com_googlesource_quiche//:quic_platform_base"], 2568 + ) 2569 + 2570 + -envoy_cc_test_library( 2571 + - name = "quic_platform_port_utils_impl_lib", 2572 + - srcs = ["quic_port_utils_impl.cc"], 2573 + - hdrs = ["quic_port_utils_impl.h"], 2574 + - tags = ["nofips"], 2575 + - deps = [ 2576 + - "//source/common/network:utility_lib", 2577 + - "//test/test_common:environment_lib", 2578 + - ], 2579 + -) 2580 + - 2581 + envoy_cc_test_library( 2582 + name = "quic_platform_test_mem_slice_vector_impl_lib", 2583 + hdrs = ["quic_test_mem_slice_vector_impl.h"], 2584 + diff --git a/test/extensions/quic_listeners/quiche/platform/http2_platform_test.cc b/test/extensions/quic_listeners/quiche/platform/http2_platform_test.cc 2585 + index 069a79eab..35aee5d27 100644 2586 + --- a/test/extensions/quic_listeners/quiche/platform/http2_platform_test.cc 2587 + +++ b/test/extensions/quic_listeners/quiche/platform/http2_platform_test.cc 2588 + @@ -72,20 +72,14 @@ TEST(Http2PlatformTest, Http2Log) { 2589 + HTTP2_DLOG_EVERY_N(ERROR, 2) << "DLOG_EVERY_N(ERROR, 2)"; 2590 + } 2591 + 2592 + -TEST(Http2PlatformTest, Http2StringPiece) { 2593 + - std::string s = "bar"; 2594 + - quiche::QuicheStringPiece sp(s); 2595 + - EXPECT_EQ('b', sp[0]); 2596 + -} 2597 + - 2598 + TEST(Http2PlatformTest, Http2Macro) { 2599 + EXPECT_DEBUG_DEATH(HTTP2_UNREACHABLE(), ""); 2600 + EXPECT_DEATH(HTTP2_DIE_IF_NULL(nullptr), ""); 2601 + } 2602 + 2603 + TEST(Http2PlatformTest, Http2Flags) { 2604 + - auto& flag_registry = quiche::FlagRegistry::GetInstance(); 2605 + - flag_registry.ResetFlags(); 2606 + + auto& flag_registry = quiche::FlagRegistry::getInstance(); 2607 + + flag_registry.resetFlags(); 2608 + EXPECT_FALSE(GetHttp2ReloadableFlag(http2_testonly_default_false)); 2609 + SetHttp2ReloadableFlag(http2_testonly_default_false, true); 2610 + EXPECT_TRUE(GetHttp2ReloadableFlag(http2_testonly_default_false)); 2611 + @@ -93,22 +87,22 @@ TEST(Http2PlatformTest, Http2Flags) { 2612 + for (std::string s : {"1", "t", "true", "TRUE", "y", "yes", "Yes"}) { 2613 + SetHttp2ReloadableFlag(http2_testonly_default_false, false); 2614 + EXPECT_FALSE(GetHttp2ReloadableFlag(http2_testonly_default_false)); 2615 + - EXPECT_TRUE(flag_registry.FindFlag("http2_reloadable_flag_http2_testonly_default_false") 2616 + - ->SetValueFromString(s)); 2617 + + EXPECT_TRUE(flag_registry.findFlag("FLAGS_quic_reloadable_flag_http2_testonly_default_false") 2618 + + ->setValueFromString(s)); 2619 + EXPECT_TRUE(GetHttp2ReloadableFlag(http2_testonly_default_false)); 2620 + } 2621 + for (std::string s : {"0", "f", "false", "FALSE", "n", "no", "No"}) { 2622 + SetHttp2ReloadableFlag(http2_testonly_default_false, true); 2623 + EXPECT_TRUE(GetHttp2ReloadableFlag(http2_testonly_default_false)); 2624 + - EXPECT_TRUE(flag_registry.FindFlag("http2_reloadable_flag_http2_testonly_default_false") 2625 + - ->SetValueFromString(s)); 2626 + + EXPECT_TRUE(flag_registry.findFlag("FLAGS_quic_reloadable_flag_http2_testonly_default_false") 2627 + + ->setValueFromString(s)); 2628 + EXPECT_FALSE(GetHttp2ReloadableFlag(http2_testonly_default_false)); 2629 + } 2630 + for (std::string s : {"some", "invalid", "values", ""}) { 2631 + SetHttp2ReloadableFlag(http2_testonly_default_false, false); 2632 + EXPECT_FALSE(GetHttp2ReloadableFlag(http2_testonly_default_false)); 2633 + - EXPECT_FALSE(flag_registry.FindFlag("http2_reloadable_flag_http2_testonly_default_false") 2634 + - ->SetValueFromString(s)); 2635 + + EXPECT_FALSE(flag_registry.findFlag("FLAGS_quic_reloadable_flag_http2_testonly_default_false") 2636 + + ->setValueFromString(s)); 2637 + EXPECT_FALSE(GetHttp2ReloadableFlag(http2_testonly_default_false)); 2638 + } 2639 + } 2640 + diff --git a/test/extensions/quic_listeners/quiche/platform/quic_platform_test.cc b/test/extensions/quic_listeners/quiche/platform/quic_platform_test.cc 2641 + index 68141aa94..902ad1a9e 100644 2642 + --- a/test/extensions/quic_listeners/quiche/platform/quic_platform_test.cc 2643 + +++ b/test/extensions/quic_listeners/quiche/platform/quic_platform_test.cc 2644 + @@ -30,7 +30,6 @@ 2645 + #include "gtest/gtest.h" 2646 + #include "quiche/common/platform/api/quiche_string_piece.h" 2647 + #include "quiche/epoll_server/fake_simple_epoll_server.h" 2648 + -#include "quiche/quic/platform/api/quic_aligned.h" 2649 + #include "quiche/quic/platform/api/quic_bug_tracker.h" 2650 + #include "quiche/quic/platform/api/quic_cert_utils.h" 2651 + #include "quiche/quic/platform/api/quic_client_stats.h" 2652 + @@ -42,7 +41,6 @@ 2653 + #include "quiche/quic/platform/api/quic_flags.h" 2654 + #include "quiche/quic/platform/api/quic_hostname_utils.h" 2655 + #include "quiche/quic/platform/api/quic_logging.h" 2656 + -#include "quiche/quic/platform/api/quic_macros.h" 2657 + #include "quiche/quic/platform/api/quic_map_util.h" 2658 + #include "quiche/quic/platform/api/quic_mem_slice.h" 2659 + #include "quiche/quic/platform/api/quic_mem_slice_span.h" 2660 + @@ -50,7 +48,6 @@ 2661 + #include "quiche/quic/platform/api/quic_mock_log.h" 2662 + #include "quiche/quic/platform/api/quic_mutex.h" 2663 + #include "quiche/quic/platform/api/quic_pcc_sender.h" 2664 + -#include "quiche/quic/platform/api/quic_port_utils.h" 2665 + #include "quiche/quic/platform/api/quic_ptr_util.h" 2666 + #include "quiche/quic/platform/api/quic_server_stats.h" 2667 + #include "quiche/quic/platform/api/quic_sleep.h" 2668 + @@ -92,8 +89,6 @@ protected: 2669 + const int verbosity_log_threshold_; 2670 + }; 2671 + 2672 + -TEST_F(QuicPlatformTest, QuicAlignOf) { EXPECT_LT(0, QUIC_ALIGN_OF(int)); } 2673 + - 2674 + enum class TestEnum { ZERO = 0, ONE, TWO, COUNT }; 2675 + 2676 + TEST_F(QuicPlatformTest, QuicBugTracker) { 2677 + @@ -468,9 +463,9 @@ TEST_F(QuicPlatformTest, QuicCertUtils) { 2678 + unsigned char* der = nullptr; 2679 + int len = i2d_X509(x509_cert.get(), &der); 2680 + ASSERT_GT(len, 0); 2681 + - quiche::QuicheStringPiece out; 2682 + + absl::string_view out; 2683 + QuicCertUtils::ExtractSubjectNameFromDERCert( 2684 + - quiche::QuicheStringPiece(reinterpret_cast<const char*>(der), len), &out); 2685 + + absl::string_view(reinterpret_cast<const char*>(der), len), &out); 2686 + EXPECT_EQ("0z1\v0\t\x6\x3U\x4\x6\x13\x2US1\x13" 2687 + "0\x11\x6\x3U\x4\b\f\nCalifornia1\x16" 2688 + "0\x14\x6\x3U\x4\a\f\rSan Francisco1\r" 2689 + @@ -566,8 +561,8 @@ TEST_F(QuicPlatformTest, MonotonicityWithFakeEpollClock) { 2690 + } 2691 + 2692 + TEST_F(QuicPlatformTest, QuicFlags) { 2693 + - auto& flag_registry = quiche::FlagRegistry::GetInstance(); 2694 + - flag_registry.ResetFlags(); 2695 + + auto& flag_registry = quiche::FlagRegistry::getInstance(); 2696 + + flag_registry.resetFlags(); 2697 + 2698 + EXPECT_FALSE(GetQuicReloadableFlag(quic_testonly_default_false)); 2699 + EXPECT_TRUE(GetQuicReloadableFlag(quic_testonly_default_true)); 2700 + @@ -583,14 +578,15 @@ TEST_F(QuicPlatformTest, QuicFlags) { 2701 + SetQuicFlag(FLAGS_quic_time_wait_list_seconds, 100); 2702 + EXPECT_EQ(100, GetQuicFlag(FLAGS_quic_time_wait_list_seconds)); 2703 + 2704 + - flag_registry.ResetFlags(); 2705 + + flag_registry.resetFlags(); 2706 + EXPECT_FALSE(GetQuicReloadableFlag(quic_testonly_default_false)); 2707 + EXPECT_TRUE(GetQuicRestartFlag(quic_testonly_default_true)); 2708 + EXPECT_EQ(200, GetQuicFlag(FLAGS_quic_time_wait_list_seconds)); 2709 + - flag_registry.FindFlag("quic_reloadable_flag_quic_testonly_default_false") 2710 + - ->SetValueFromString("true"); 2711 + - flag_registry.FindFlag("quic_restart_flag_quic_testonly_default_true")->SetValueFromString("0"); 2712 + - flag_registry.FindFlag("quic_time_wait_list_seconds")->SetValueFromString("100"); 2713 + + flag_registry.findFlag("FLAGS_quic_reloadable_flag_quic_testonly_default_false") 2714 + + ->setValueFromString("true"); 2715 + + flag_registry.findFlag("FLAGS_quic_restart_flag_quic_testonly_default_true") 2716 + + ->setValueFromString("0"); 2717 + + flag_registry.findFlag("FLAGS_quic_time_wait_list_seconds")->setValueFromString("100"); 2718 + EXPECT_TRUE(GetQuicReloadableFlag(quic_testonly_default_false)); 2719 + EXPECT_FALSE(GetQuicRestartFlag(quic_testonly_default_true)); 2720 + EXPECT_EQ(100, GetQuicFlag(FLAGS_quic_time_wait_list_seconds)); 2721 + @@ -661,35 +657,6 @@ TEST_F(FileUtilsTest, ReadFileContents) { 2722 + EXPECT_EQ(data, output); 2723 + } 2724 + 2725 + -TEST_F(QuicPlatformTest, PickUnsedPort) { 2726 + - int port = QuicPickServerPortForTestsOrDie(); 2727 + - std::vector<Envoy::Network::Address::IpVersion> supported_versions = 2728 + - Envoy::TestEnvironment::getIpVersionsForTest(); 2729 + - for (auto ip_version : supported_versions) { 2730 + - Envoy::Network::Address::InstanceConstSharedPtr addr = 2731 + - Envoy::Network::Test::getCanonicalLoopbackAddress(ip_version); 2732 + - Envoy::Network::Address::InstanceConstSharedPtr addr_with_port = 2733 + - Envoy::Network::Utility::getAddressWithPort(*addr, port); 2734 + - Envoy::Network::SocketImpl sock(Envoy::Network::Socket::Type::Datagram, addr_with_port); 2735 + - // binding of given port should success. 2736 + - EXPECT_EQ(0, sock.bind(addr_with_port).rc_); 2737 + - } 2738 + -} 2739 + - 2740 + -TEST_F(QuicPlatformTest, FailToPickUnsedPort) { 2741 + - Envoy::Api::MockOsSysCalls os_sys_calls; 2742 + - Envoy::TestThreadsafeSingletonInjector<Envoy::Api::OsSysCallsImpl> os_calls(&os_sys_calls); 2743 + - // Actually create sockets. 2744 + - EXPECT_CALL(os_sys_calls, socket(_, _, _)).WillRepeatedly([](int domain, int type, int protocol) { 2745 + - os_fd_t fd = ::socket(domain, type, protocol); 2746 + - return Envoy::Api::SysCallSocketResult{fd, errno}; 2747 + - }); 2748 + - // Fail bind call's to mimic port exhaustion. 2749 + - EXPECT_CALL(os_sys_calls, bind(_, _, _)) 2750 + - .WillRepeatedly(Return(Envoy::Api::SysCallIntResult{-1, SOCKET_ERROR_ADDR_IN_USE})); 2751 + - EXPECT_DEATH(QuicPickServerPortForTestsOrDie(), "Failed to pick a port for test."); 2752 + -} 2753 + - 2754 + TEST_F(QuicPlatformTest, TestEnvoyQuicBufferAllocator) { 2755 + QuicStreamBufferAllocator allocator; 2756 + Envoy::Stats::TestUtil::MemoryTest memory_test; 2757 + @@ -711,14 +678,6 @@ TEST_F(QuicPlatformTest, TestSystemEventLoop) { 2758 + QuicSystemEventLoop("dummy"); 2759 + } 2760 + 2761 + -QUIC_MUST_USE_RESULT bool dummyTestFunction() { return false; } 2762 + - 2763 + -TEST_F(QuicPlatformTest, TestQuicMacros) { 2764 + - // Just make sure it compiles. 2765 + - EXPECT_FALSE(dummyTestFunction()); 2766 + - int a QUIC_UNUSED; 2767 + -} 2768 + - 2769 + TEST(EnvoyQuicMemSliceTest, ConstructMemSliceFromBuffer) { 2770 + std::string str(512, 'b'); 2771 + // Fragment needs to out-live buffer. 2772 + diff --git a/test/extensions/quic_listeners/quiche/platform/quic_test_output_impl.cc b/test/extensions/quic_listeners/quiche/platform/quic_test_output_impl.cc 2773 + index 556f6cd3e..9eaf8532a 100644 2774 + --- a/test/extensions/quic_listeners/quiche/platform/quic_test_output_impl.cc 2775 + +++ b/test/extensions/quic_listeners/quiche/platform/quic_test_output_impl.cc 2776 + @@ -19,7 +19,7 @@ 2777 + namespace quic { 2778 + namespace { 2779 + 2780 + -void QuicRecordTestOutputToFile(const std::string& filename, quiche::QuicheStringPiece data) { 2781 + +void quicRecordTestOutputToFile(const std::string& filename, absl::string_view data) { 2782 + const char* output_dir_env = std::getenv("QUIC_TEST_OUTPUT_DIR"); 2783 + if (output_dir_env == nullptr) { 2784 + QUIC_LOG(WARNING) << "Could not save test output since QUIC_TEST_OUTPUT_DIR is not set"; 2785 + @@ -64,11 +64,13 @@ void QuicRecordTestOutputToFile(const std::string& filename, quiche::QuicheStrin 2786 + } 2787 + } // namespace 2788 + 2789 + -void QuicSaveTestOutputImpl(quiche::QuicheStringPiece filename, quiche::QuicheStringPiece data) { 2790 + - QuicRecordTestOutputToFile(filename.data(), data); 2791 + +// NOLINTNEXTLINE(readability-identifier-naming) 2792 + +void QuicSaveTestOutputImpl(absl::string_view filename, absl::string_view data) { 2793 + + quicRecordTestOutputToFile(filename.data(), data); 2794 + } 2795 + 2796 + -bool QuicLoadTestOutputImpl(quiche::QuicheStringPiece filename, std::string* data) { 2797 + +// NOLINTNEXTLINE(readability-identifier-naming) 2798 + +bool QuicLoadTestOutputImpl(absl::string_view filename, std::string* data) { 2799 + const char* read_dir_env = std::getenv("QUIC_TEST_OUTPUT_DIR"); 2800 + if (read_dir_env == nullptr) { 2801 + QUIC_LOG(WARNING) << "Could not load test output since QUIC_TEST_OUTPUT_DIR is not set"; 2802 + @@ -96,7 +98,8 @@ bool QuicLoadTestOutputImpl(quiche::QuicheStringPiece filename, std::string* dat 2803 + return true; 2804 + } 2805 + 2806 + -void QuicRecordTraceImpl(quiche::QuicheStringPiece identifier, quiche::QuicheStringPiece data) { 2807 + +// NOLINTNEXTLINE(readability-identifier-naming) 2808 + +void QuicRecordTraceImpl(absl::string_view identifier, absl::string_view data) { 2809 + const testing::TestInfo* test_info = testing::UnitTest::GetInstance()->current_test_info(); 2810 + 2811 + std::string timestamp = absl::FormatTime("%Y%m%d%H%M%S", absl::Now(), absl::LocalTimeZone()); 2812 + @@ -104,7 +107,7 @@ void QuicRecordTraceImpl(quiche::QuicheStringPiece identifier, quiche::QuicheStr 2813 + std::string filename = fmt::sprintf("%s.%s.%s.%s.qtr", test_info->name(), 2814 + test_info->test_case_name(), identifier.data(), timestamp); 2815 + 2816 + - QuicRecordTestOutputToFile(filename, data); 2817 + + quicRecordTestOutputToFile(filename, data); 2818 + } 2819 + 2820 + } // namespace quic 2821 + diff --git a/test/extensions/quic_listeners/quiche/platform/quic_test_output_impl.h b/test/extensions/quic_listeners/quiche/platform/quic_test_output_impl.h 2822 + index a1c6c7305..fcf0c47b3 100644 2823 + --- a/test/extensions/quic_listeners/quiche/platform/quic_test_output_impl.h 2824 + +++ b/test/extensions/quic_listeners/quiche/platform/quic_test_output_impl.h 2825 + @@ -6,14 +6,16 @@ 2826 + // consumed or referenced directly by other Envoy code. It serves purely as a 2827 + // porting layer for QUICHE. 2828 + 2829 + -#include "quiche/common/platform/api/quiche_string_piece.h" 2830 + +#include "absl/strings/string_view.h" 2831 + 2832 + namespace quic { 2833 + +// NOLINTNEXTLINE(readability-identifier-naming) 2834 + +void QuicSaveTestOutputImpl(absl::string_view filename, absl::string_view data); 2835 + 2836 + -void QuicSaveTestOutputImpl(quiche::QuicheStringPiece filename, quiche::QuicheStringPiece data); 2837 + +// NOLINTNEXTLINE(readability-identifier-naming) 2838 + +bool QuicLoadTestOutputImpl(absl::string_view filename, std::string* data); 2839 + 2840 + -bool QuicLoadTestOutputImpl(quiche::QuicheStringPiece filename, std::string* data); 2841 + - 2842 + -void QuicRecordTraceImpl(quiche::QuicheStringPiece identifier, quiche::QuicheStringPiece data); 2843 + +// NOLINTNEXTLINE(readability-identifier-naming) 2844 + +void QuicRecordTraceImpl(absl::string_view identifier, absl::string_view data); 2845 + 2846 + } // namespace quic 2847 + diff --git a/test/extensions/quic_listeners/quiche/platform/quiche_platform_test.cc b/test/extensions/quic_listeners/quiche/platform/quiche_platform_test.cc 2848 + deleted file mode 100644 2849 + index a733894b5..000000000 2850 + --- a/test/extensions/quic_listeners/quiche/platform/quiche_platform_test.cc 2851 + +++ /dev/null 2852 + @@ -1,39 +0,0 @@ 2853 + -// NOLINT(namespace-envoy) 2854 + - 2855 + -// This file is part of the QUICHE platform implementation, and is not to be 2856 + -// consumed or referenced directly by other Envoy code. It serves purely as a 2857 + -// porting layer for QUICHE. 2858 + - 2859 + -#include "gtest/gtest.h" 2860 + -#include "quiche/common/platform/api/quiche_arraysize.h" 2861 + -#include "quiche/common/platform/api/quiche_endian.h" 2862 + -#include "quiche/common/platform/api/quiche_optional.h" 2863 + -#include "quiche/common/platform/api/quiche_ptr_util.h" 2864 + -#include "quiche/common/platform/api/quiche_string_piece.h" 2865 + - 2866 + -namespace quiche { 2867 + - 2868 + -TEST(QuichePlatformTest, Arraysize) { 2869 + - int array[] = {0, 1, 2, 3, 4}; 2870 + - EXPECT_EQ(5, QUICHE_ARRAYSIZE(array)); 2871 + -} 2872 + - 2873 + -TEST(QuichePlatformTest, StringPiece) { 2874 + - std::string s = "bar"; 2875 + - QuicheStringPiece sp(s); 2876 + - EXPECT_EQ('b', sp[0]); 2877 + -} 2878 + - 2879 + -TEST(QuichePlatformTest, WrapUnique) { 2880 + - auto p = QuicheWrapUnique(new int(6)); 2881 + - EXPECT_EQ(6, *p); 2882 + -} 2883 + - 2884 + -TEST(QuichePlatformTest, TestQuicheOptional) { 2885 + - QuicheOptional<int32_t> maybe_a; 2886 + - EXPECT_FALSE(maybe_a.has_value()); 2887 + - maybe_a = 1; 2888 + - EXPECT_EQ(1, *maybe_a); 2889 + -} 2890 + - 2891 + -} // namespace quiche 2892 + diff --git a/test/extensions/quic_listeners/quiche/platform/spdy_platform_test.cc b/test/extensions/quic_listeners/quiche/platform/spdy_platform_test.cc 2893 + index 56453e232..eeae58c0a 100644 2894 + --- a/test/extensions/quic_listeners/quiche/platform/spdy_platform_test.cc 2895 + +++ b/test/extensions/quic_listeners/quiche/platform/spdy_platform_test.cc 2896 + @@ -8,7 +8,6 @@ 2897 + #include "gtest/gtest.h" 2898 + #include "quiche/spdy/platform/api/spdy_bug_tracker.h" 2899 + #include "quiche/spdy/platform/api/spdy_containers.h" 2900 + -#include "quiche/spdy/platform/api/spdy_endianness_util.h" 2901 + #include "quiche/spdy/platform/api/spdy_estimate_memory_usage.h" 2902 + #include "quiche/spdy/platform/api/spdy_flags.h" 2903 + #include "quiche/spdy/platform/api/spdy_logging.h" 2904 + @@ -47,11 +46,6 @@ TEST(SpdyPlatformTest, SpdyHashSet) { 2905 + EXPECT_EQ(0, hset.count("qux")); 2906 + } 2907 + 2908 + -TEST(SpdyPlatformTest, SpdyEndianness) { 2909 + - EXPECT_EQ(0x1234, spdy::SpdyNetToHost16(spdy::SpdyHostToNet16(0x1234))); 2910 + - EXPECT_EQ(0x12345678, spdy::SpdyNetToHost32(spdy::SpdyHostToNet32(0x12345678))); 2911 + -} 2912 + - 2913 + TEST(SpdyPlatformTest, SpdyEstimateMemoryUsage) { 2914 + std::string s = "foo"; 2915 + // Stubbed out to always return 0. 2916 + @@ -92,19 +86,19 @@ TEST(SpdyPlatformTest, SpdyTestHelpers) { 2917 + } 2918 + 2919 + TEST(SpdyPlatformTest, SpdyFlags) { 2920 + - auto& flag_registry = quiche::FlagRegistry::GetInstance(); 2921 + - flag_registry.ResetFlags(); 2922 + + auto& flag_registry = quiche::FlagRegistry::getInstance(); 2923 + + flag_registry.resetFlags(); 2924 + EXPECT_FALSE(GetSpdyReloadableFlag(spdy_testonly_default_false)); 2925 + EXPECT_FALSE(GetSpdyRestartFlag(spdy_testonly_default_false)); 2926 + 2927 + - flag_registry.FindFlag("spdy_reloadable_flag_spdy_testonly_default_false") 2928 + - ->SetValueFromString("true"); 2929 + + flag_registry.findFlag("FLAGS_quic_reloadable_flag_spdy_testonly_default_false") 2930 + + ->setValueFromString("true"); 2931 + EXPECT_TRUE(GetSpdyReloadableFlag(spdy_testonly_default_false)); 2932 + EXPECT_FALSE(GetSpdyRestartFlag(spdy_testonly_default_false)); 2933 + 2934 + - flag_registry.ResetFlags(); 2935 + - flag_registry.FindFlag("spdy_restart_flag_spdy_testonly_default_false") 2936 + - ->SetValueFromString("yes"); 2937 + + flag_registry.resetFlags(); 2938 + + flag_registry.findFlag("FLAGS_quic_restart_flag_spdy_testonly_default_false") 2939 + + ->setValueFromString("yes"); 2940 + EXPECT_FALSE(GetSpdyReloadableFlag(spdy_testonly_default_false)); 2941 + EXPECT_TRUE(GetSpdyRestartFlag(spdy_testonly_default_false)); 2942 + } 2943 + diff --git a/test/extensions/quic_listeners/quiche/test_proof_source.h b/test/extensions/quic_listeners/quiche/test_proof_source.h 2944 + index a249b4314..bbedfd6c7 100644 2945 + --- a/test/extensions/quic_listeners/quiche/test_proof_source.h 2946 + +++ b/test/extensions/quic_listeners/quiche/test_proof_source.h 2947 + @@ -36,7 +36,7 @@ protected: 2948 + void signPayload(const quic::QuicSocketAddress& /*server_address*/, 2949 + const quic::QuicSocketAddress& /*client_address*/, 2950 + const std::string& /*hostname*/, uint16_t /*signature_algorithm*/, 2951 + - quiche::QuicheStringPiece in, 2952 + + absl::string_view in, 2953 + std::unique_ptr<quic::ProofSource::SignatureCallback> callback) override { 2954 + callback->Run(true, absl::StrCat("Fake signature for { ", in, " }"), 2955 + std::make_unique<EnvoyQuicProofSourceDetails>(filter_chain_)); 2956 + diff --git a/test/extensions/quic_listeners/quiche/test_utils.h b/test/extensions/quic_listeners/quiche/test_utils.h 2957 + index 102f7608e..7f0ea78e8 100644 2958 + --- a/test/extensions/quic_listeners/quiche/test_utils.h 2959 + +++ b/test/extensions/quic_listeners/quiche/test_utils.h 2960 + @@ -46,7 +46,7 @@ public: 2961 + MOCK_METHOD(quic::QuicConsumedData, WritevData, 2962 + (quic::QuicStreamId id, size_t write_length, quic::QuicStreamOffset offset, 2963 + quic::StreamSendingState state, quic::TransmissionType type, 2964 + - quiche::QuicheOptional<quic::EncryptionLevel> level)); 2965 + + absl::optional<quic::EncryptionLevel> level)); 2966 + MOCK_METHOD(bool, ShouldYield, (quic::QuicStreamId id)); 2967 + 2968 + absl::string_view requestedServerName() const override { 2969 + @@ -90,7 +90,7 @@ public: 2970 + MOCK_METHOD(quic::QuicConsumedData, WritevData, 2971 + (quic::QuicStreamId id, size_t write_length, quic::QuicStreamOffset offset, 2972 + quic::StreamSendingState state, quic::TransmissionType type, 2973 + - quiche::QuicheOptional<quic::EncryptionLevel> level)); 2974 + + absl::optional<quic::EncryptionLevel> level)); 2975 + MOCK_METHOD(bool, ShouldYield, (quic::QuicStreamId id)); 2976 + 2977 + absl::string_view requestedServerName() const override { 2978 + -- 2979 + 2.29.2 2980 +
+91
pkgs/servers/http/envoy/0002-Add-upb-patch-to-make-it-compile-under-GCC10.patch
··· 1 + From 8b531c41f956b27e4be32b430db2e7a44e0cdd3e Mon Sep 17 00:00:00 2001 2 + From: Luke Granger-Brown <git@lukegb.com> 3 + Date: Thu, 7 Jan 2021 11:09:18 +0000 4 + Subject: [PATCH] Add upb patch to make it compile under GCC10 5 + 6 + --- 7 + bazel/repositories.bzl | 5 +++- 8 + bazel/upb2.patch | 55 ++++++++++++++++++++++++++++++++++++++++++ 9 + 2 files changed, 59 insertions(+), 1 deletion(-) 10 + create mode 100644 bazel/upb2.patch 11 + 12 + diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl 13 + index 64d61ea49..c6cadc9df 100644 14 + --- a/bazel/repositories.bzl 15 + +++ b/bazel/repositories.bzl 16 + @@ -811,7 +811,10 @@ def _com_github_grpc_grpc(): 17 + def _upb(): 18 + _repository_impl( 19 + name = "upb", 20 + - patches = ["@envoy//bazel:upb.patch"], 21 + + patches = [ 22 + + "@envoy//bazel:upb.patch", 23 + + "@envoy//bazel:upb2.patch", 24 + + ], 25 + patch_args = ["-p1"], 26 + ) 27 + 28 + diff --git a/bazel/upb2.patch b/bazel/upb2.patch 29 + new file mode 100644 30 + index 000000000..6e436c61b 31 + --- /dev/null 32 + +++ b/bazel/upb2.patch 33 + @@ -0,0 +1,55 @@ 34 + +From 9bd23dab4240b015321a53c45b3c9e4847fbf020 Mon Sep 17 00:00:00 2001 35 + +From: Joshua Haberman <jhaberman@gmail.com> 36 + +Date: Tue, 7 Apr 2020 15:22:11 -0700 37 + +Subject: [PATCH] Changed upb status to suit GCC10's warning about strncpy(). 38 + + (#268) 39 + + 40 + +Added tests for all cases. Also removed ellipses from truncated 41 + +messages, they were more trouble than they are worth. 42 + +--- 43 + + tests/test_generated_code.c | 33 +++++++++++++++++++++++++++++++++ 44 + + upb/upb.c | 17 +++-------------- 45 + + 2 files changed, 36 insertions(+), 14 deletions(-) 46 + + 47 + +diff --git a/upb/upb.c b/upb/upb.c 48 + +index cb2cdfd9d..258192d79 100644 49 + +--- a/upb/upb.c 50 + ++++ b/upb/upb.c 51 + +@@ -11,17 +11,6 @@ 52 + + 53 + + #include "upb/port_def.inc" 54 + + 55 + +-/* Guarantee null-termination and provide ellipsis truncation. 56 + +- * It may be tempting to "optimize" this by initializing these final 57 + +- * four bytes up-front and then being careful never to overwrite them, 58 + +- * this is safer and simpler. */ 59 + +-static void nullz(upb_status *status) { 60 + +- const char *ellipsis = "..."; 61 + +- size_t len = strlen(ellipsis); 62 + +- UPB_ASSERT(sizeof(status->msg) > len); 63 + +- memcpy(status->msg + sizeof(status->msg) - len, ellipsis, len); 64 + +-} 65 + +- 66 + + /* upb_status *****************************************************************/ 67 + + 68 + + void upb_status_clear(upb_status *status) { 69 + +@@ -37,8 +26,8 @@ const char *upb_status_errmsg(const upb_status *status) { return status->msg; } 70 + + void upb_status_seterrmsg(upb_status *status, const char *msg) { 71 + + if (!status) return; 72 + + status->ok = false; 73 + +- strncpy(status->msg, msg, sizeof(status->msg)); 74 + +- nullz(status); 75 + ++ strncpy(status->msg, msg, UPB_STATUS_MAX_MESSAGE - 1); 76 + ++ status->msg[UPB_STATUS_MAX_MESSAGE - 1] = '\0'; 77 + + } 78 + + 79 + + void upb_status_seterrf(upb_status *status, const char *fmt, ...) { 80 + +@@ -52,7 +41,7 @@ void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args) { 81 + + if (!status) return; 82 + + status->ok = false; 83 + + _upb_vsnprintf(status->msg, sizeof(status->msg), fmt, args); 84 + +- nullz(status); 85 + ++ status->msg[UPB_STATUS_MAX_MESSAGE - 1] = '\0'; 86 + + } 87 + + 88 + + /* upb_alloc ******************************************************************/ 89 + -- 90 + 2.29.2 91 +
+119
pkgs/servers/http/envoy/default.nix
··· 1 + { buildBazelPackage 2 + , fetchFromGitHub 3 + , stdenv 4 + , cmake 5 + , go 6 + , ninja 7 + , python3 8 + }: 9 + 10 + let 11 + srcVer = { 12 + # We need the commit hash, since Bazel stamps the build with it. 13 + # However, the version string is more useful for end-users. 14 + # These are contained in a attrset of their own to make it obvious that 15 + # people should update both. 16 + version = "1.16.2"; 17 + commit = "e98e41a8e168af7acae8079fc0cd68155f699aa3"; 18 + }; 19 + in 20 + buildBazelPackage rec { 21 + pname = "envoy"; 22 + version = srcVer.version; 23 + src = fetchFromGitHub { 24 + owner = "envoyproxy"; 25 + repo = "envoy"; 26 + rev = srcVer.commit; 27 + hash = "sha256-aWVMRKFCZzf9/96NRPCP4jiW38DJhXyi0gEqW7uIpnQ="; 28 + 29 + extraPostFetch = '' 30 + chmod -R +w $out 31 + rm $out/.bazelversion 32 + echo ${srcVer.commit} > $out/SOURCE_VERSION 33 + sed -i 's/GO_VERSION = ".*"/GO_VERSION = "host"/g' $out/bazel/dependency_imports.bzl 34 + ''; 35 + }; 36 + 37 + patches = [ 38 + # Quiche needs to be updated to compile under newer GCC. 39 + # This is a manual backport of http://github.com/envoyproxy/envoy/pull/13949. 40 + ./0001-quiche-update-QUICHE-tar-13949.patch 41 + 42 + # upb needs to be updated to compile under newer GCC. 43 + # This is a manual backport of https://github.com/protocolbuffers/upb/commit/9bd23dab4240b015321a53c45b3c9e4847fbf020. 44 + ./0002-Add-upb-patch-to-make-it-compile-under-GCC10.patch 45 + ]; 46 + postPatch = '' 47 + sed -i 's,#!/usr/bin/env python3,#!${python3}/bin/python,' bazel/foreign_cc/luajit.patch 48 + ''; 49 + 50 + nativeBuildInputs = [ 51 + cmake 52 + python3 53 + go 54 + ninja 55 + ]; 56 + 57 + fetchAttrs = { 58 + sha256 = "sha256-mct7anzErY9eSujZyGORfRJqzAO9XuFAv04DS8VRZKM="; 59 + dontUseCmakeConfigure = true; 60 + preInstall = '' 61 + # Strip out the path to the build location (by deleting the comment line). 62 + find $bazelOut/external -name requirements.bzl | while read requirements; do 63 + sed -i '/# Generated from /d' "$requirements" 64 + done 65 + 66 + # Remove references to paths in the Nix store. 67 + sed -i \ 68 + -e 's,${python3},__NIXPYTHON__,' \ 69 + -e 's,${stdenv.shellPackage},__NIXSHELL__,' \ 70 + $bazelOut/external/com_github_luajit_luajit/build.py \ 71 + $bazelOut/external/local_config_sh/BUILD 72 + rm -r $bazelOut/external/go_sdk 73 + 74 + # Replace some wheels which are only used for tests with empty files; 75 + # they're nondeterministically built and packed. 76 + >$bazelOut/external/config_validation_pip3/PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl 77 + >$bazelOut/external/protodoc_pip3/PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl 78 + >$bazelOut/external/thrift_pip3/thrift-0.13.0-cp38-cp38-linux_x86_64.whl 79 + ''; 80 + }; 81 + buildAttrs = { 82 + dontUseCmakeConfigure = true; 83 + dontUseNinjaInstall = true; 84 + preConfigure = '' 85 + sed -i 's,#!/usr/bin/env bash,#!${stdenv.shell},' $bazelOut/external/rules_foreign_cc/tools/build_defs/framework.bzl 86 + 87 + # Add paths to Nix store back. 88 + sed -i \ 89 + -e 's,__NIXPYTHON__,${python3},' \ 90 + -e 's,__NIXSHELL__,${stdenv.shellPackage},' \ 91 + $bazelOut/external/com_github_luajit_luajit/build.py \ 92 + $bazelOut/external/local_config_sh/BUILD 93 + ''; 94 + installPhase = '' 95 + install -Dm0755 bazel-bin/source/exe/envoy-static $out/bin/envoy 96 + ''; 97 + }; 98 + 99 + fetchConfigured = true; 100 + removeRulesCC = false; 101 + removeLocalConfigCc = true; 102 + removeLocal = false; 103 + bazelTarget = "//source/exe:envoy-static"; 104 + bazelBuildFlags = [ 105 + "-c opt" 106 + "--spawn_strategy=standalone" 107 + "--noexperimental_strict_action_env" 108 + "--cxxopt=-Wno-maybe-uninitialized" 109 + "--cxxopt=-Wno-uninitialized" 110 + ]; 111 + 112 + meta = with stdenv.lib; { 113 + homepage = "https://envoyproxy.io"; 114 + description = "Cloud-native edge and service proxy"; 115 + license = licenses.asl20; 116 + maintainers = with maintainers; [ lukegb ]; 117 + platforms = [ "x86_64-linux" ]; # Other platforms will generate different fetch hashes. 118 + }; 119 + }
+2
pkgs/top-level/all-packages.nix
··· 17500 17500 17501 17501 engelsystem = callPackage ../servers/web-apps/engelsystem { }; 17502 17502 17503 + envoy = callPackage ../servers/http/envoy { }; 17504 + 17503 17505 etcd = callPackage ../servers/etcd { }; 17504 17506 etcd_3_4 = callPackage ../servers/etcd/3.4.nix { }; 17505 17507