@fails-components/webtransport 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +1 -3
- package/src/http3eventloop.cc +83 -9
- package/src/http3eventloop.h +13 -3
- package/src/http3server.cc +22 -22
- package/src/http3server.h +7 -20
- package/src/http3wtstreamvisitor.cc +31 -10
- package/src/http3wtstreamvisitor.h +38 -11
- package/src/webtransport.js +91 -23
- package/test/echoserver.js +29 -5
- package/test/testsuite.js +242 -220
- package/third_party/boringssl/src/CMakeLists.txt +2 -0
- package/third_party/boringssl/src/crypto/CMakeLists.txt +1 -0
- package/third_party/boringssl/src/crypto/asn1/a_bitstr.c +174 -177
- package/third_party/boringssl/src/crypto/asn1/a_bool.c +46 -48
- package/third_party/boringssl/src/crypto/asn1/a_d2i_fp.c +21 -23
- package/third_party/boringssl/src/crypto/asn1/a_dup.c +21 -23
- package/third_party/boringssl/src/crypto/asn1/a_gentm.c +84 -187
- package/third_party/boringssl/src/crypto/asn1/a_i2d_fp.c +19 -21
- package/third_party/boringssl/src/crypto/asn1/a_int.c +305 -329
- package/third_party/boringssl/src/crypto/asn1/a_mbstr.c +190 -195
- package/third_party/boringssl/src/crypto/asn1/a_object.c +182 -189
- package/third_party/boringssl/src/crypto/asn1/a_octet.c +6 -9
- package/third_party/boringssl/src/crypto/asn1/a_print.c +15 -16
- package/third_party/boringssl/src/crypto/asn1/a_strex.c +386 -399
- package/third_party/boringssl/src/crypto/asn1/a_strnid.c +110 -131
- package/third_party/boringssl/src/crypto/asn1/a_time.c +118 -111
- package/third_party/boringssl/src/crypto/asn1/a_type.c +59 -60
- package/third_party/boringssl/src/crypto/asn1/a_utctm.c +114 -186
- package/third_party/boringssl/src/crypto/asn1/a_utf8.c +171 -159
- package/third_party/boringssl/src/crypto/asn1/asn1_lib.c +245 -260
- package/third_party/boringssl/src/crypto/asn1/asn1_par.c +41 -40
- package/third_party/boringssl/src/crypto/asn1/asn1_test.cc +31 -0
- package/third_party/boringssl/src/crypto/asn1/asn_pack.c +31 -33
- package/third_party/boringssl/src/crypto/asn1/f_int.c +36 -33
- package/third_party/boringssl/src/crypto/asn1/f_string.c +29 -26
- package/third_party/boringssl/src/crypto/asn1/internal.h +62 -61
- package/third_party/boringssl/src/crypto/asn1/tasn_dec.c +706 -702
- package/third_party/boringssl/src/crypto/asn1/tasn_enc.c +507 -524
- package/third_party/boringssl/src/crypto/asn1/tasn_fre.c +141 -133
- package/third_party/boringssl/src/crypto/asn1/tasn_new.c +207 -199
- package/third_party/boringssl/src/crypto/asn1/tasn_typ.c +19 -22
- package/third_party/boringssl/src/crypto/asn1/tasn_utl.c +24 -24
- package/third_party/boringssl/src/crypto/asn1/time_support.c +13 -13
- package/third_party/boringssl/src/crypto/bio/connect.c +9 -3
- package/third_party/boringssl/src/crypto/bytestring/bytestring_test.cc +125 -1
- package/third_party/boringssl/src/crypto/bytestring/cbb.c +4 -7
- package/third_party/boringssl/src/crypto/bytestring/cbs.c +167 -9
- package/third_party/boringssl/src/crypto/cipher_extra/e_aesctrhmac.c +0 -2
- package/third_party/boringssl/src/crypto/cipher_extra/e_aesgcmsiv.c +23 -54
- package/third_party/boringssl/src/crypto/cipher_extra/e_chacha20poly1305.c +0 -2
- package/third_party/boringssl/src/crypto/cipher_extra/e_tls.c +0 -2
- package/third_party/boringssl/src/crypto/curve25519/curve25519.c +6 -8
- package/third_party/boringssl/src/crypto/evp/evp_ctx.c +25 -22
- package/third_party/boringssl/src/crypto/evp/internal.h +15 -9
- package/third_party/boringssl/src/crypto/evp/p_dsa_asn1.c +2 -0
- package/third_party/boringssl/src/crypto/evp/p_ec_asn1.c +2 -0
- package/third_party/boringssl/src/crypto/evp/p_ed25519.c +3 -3
- package/third_party/boringssl/src/crypto/evp/p_ed25519_asn1.c +10 -7
- package/third_party/boringssl/src/crypto/evp/p_hkdf.c +241 -0
- package/third_party/boringssl/src/crypto/evp/p_rsa_asn1.c +2 -0
- package/third_party/boringssl/src/crypto/evp/p_x25519_asn1.c +1 -0
- package/third_party/boringssl/src/crypto/fipsmodule/aes/aes_nohw.c +9 -10
- package/third_party/boringssl/src/crypto/fipsmodule/aes/key_wrap.c +2 -6
- package/third_party/boringssl/src/crypto/fipsmodule/bn/exponentiation.c +5 -11
- package/third_party/boringssl/src/crypto/fipsmodule/bn/internal.h +1 -1
- package/third_party/boringssl/src/crypto/fipsmodule/bn/prime.c +2 -0
- package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c +10 -26
- package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aesccm.c +2 -3
- package/third_party/boringssl/src/crypto/fipsmodule/digestsign/digestsign.c +1 -0
- package/third_party/boringssl/src/crypto/fipsmodule/ec/p256-nistz.c +44 -43
- package/third_party/boringssl/src/crypto/fipsmodule/modes/cbc.c +5 -9
- package/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c +14 -21
- package/third_party/boringssl/src/crypto/fipsmodule/rand/ctrdrbg.c +8 -8
- package/third_party/boringssl/src/crypto/fipsmodule/rand/internal.h +1 -4
- package/third_party/boringssl/src/crypto/hkdf/hkdf_test.cc +104 -0
- package/third_party/boringssl/src/crypto/internal.h +18 -4
- package/third_party/boringssl/src/crypto/lhash/internal.h +13 -1
- package/third_party/boringssl/src/crypto/obj/obj_dat.h +4 -1
- package/third_party/boringssl/src/crypto/obj/obj_mac.num +1 -0
- package/third_party/boringssl/src/crypto/obj/objects.txt +2 -0
- package/third_party/boringssl/src/crypto/pem/pem_all.c +77 -86
- package/third_party/boringssl/src/crypto/pem/pem_info.c +221 -233
- package/third_party/boringssl/src/crypto/pem/pem_lib.c +639 -608
- package/third_party/boringssl/src/crypto/pem/pem_oth.c +17 -16
- package/third_party/boringssl/src/crypto/pem/pem_pk8.c +133 -142
- package/third_party/boringssl/src/crypto/pem/pem_pkey.c +96 -92
- package/third_party/boringssl/src/crypto/poly1305/poly1305_vec.c +12 -28
- package/third_party/boringssl/src/crypto/siphash/siphash.c +8 -11
- package/third_party/boringssl/src/crypto/siphash/siphash_test.cc +5 -7
- package/third_party/boringssl/src/crypto/stack/stack.c +33 -16
- package/third_party/boringssl/src/crypto/thread_pthread.c +0 -2
- package/third_party/boringssl/src/crypto/thread_win.c +0 -2
- package/third_party/boringssl/src/crypto/trust_token/internal.h +14 -0
- package/third_party/boringssl/src/crypto/trust_token/pmbtoken.c +127 -30
- package/third_party/boringssl/src/crypto/trust_token/trust_token.c +40 -0
- package/third_party/boringssl/src/crypto/trust_token/trust_token_test.cc +165 -0
- package/third_party/boringssl/src/crypto/trust_token/voprf.c +55 -6
- package/third_party/boringssl/src/crypto/x509/a_digest.c +23 -24
- package/third_party/boringssl/src/crypto/x509/a_sign.c +52 -55
- package/third_party/boringssl/src/crypto/x509/a_verify.c +33 -34
- package/third_party/boringssl/src/crypto/x509/algorithm.c +17 -18
- package/third_party/boringssl/src/crypto/x509/asn1_gen.c +618 -612
- package/third_party/boringssl/src/crypto/x509/by_dir.c +320 -337
- package/third_party/boringssl/src/crypto/x509/by_file.c +186 -186
- package/third_party/boringssl/src/crypto/x509/i2d_pr.c +11 -14
- package/third_party/boringssl/src/crypto/x509/internal.h +22 -22
- package/third_party/boringssl/src/crypto/x509/name_print.c +155 -150
- package/third_party/boringssl/src/crypto/x509/rsa_pss.c +27 -29
- package/third_party/boringssl/src/crypto/x509/t_crl.c +67 -70
- package/third_party/boringssl/src/crypto/x509/t_req.c +3 -5
- package/third_party/boringssl/src/crypto/x509/t_x509.c +280 -251
- package/third_party/boringssl/src/crypto/x509/t_x509a.c +52 -47
- package/third_party/boringssl/src/crypto/x509/x509.c +3 -4
- package/third_party/boringssl/src/crypto/x509/x509_att.c +234 -223
- package/third_party/boringssl/src/crypto/x509/x509_cmp.c +286 -296
- package/third_party/boringssl/src/crypto/x509/x509_d2.c +37 -32
- package/third_party/boringssl/src/crypto/x509/x509_def.c +14 -30
- package/third_party/boringssl/src/crypto/x509/x509_ext.c +55 -84
- package/third_party/boringssl/src/crypto/x509/x509_lu.c +545 -581
- package/third_party/boringssl/src/crypto/x509/x509_obj.c +131 -121
- package/third_party/boringssl/src/crypto/x509/x509_req.c +120 -139
- package/third_party/boringssl/src/crypto/x509/x509_set.c +128 -142
- package/third_party/boringssl/src/crypto/x509/x509_trs.c +185 -193
- package/third_party/boringssl/src/crypto/x509/x509_txt.c +70 -72
- package/third_party/boringssl/src/crypto/x509/x509_v3.c +172 -161
- package/third_party/boringssl/src/crypto/x509/x509_vfy.c +2041 -2053
- package/third_party/boringssl/src/crypto/x509/x509_vpm.c +441 -461
- package/third_party/boringssl/src/crypto/x509/x509cset.c +152 -170
- package/third_party/boringssl/src/crypto/x509/x509name.c +274 -260
- package/third_party/boringssl/src/crypto/x509/x509rset.c +43 -20
- package/third_party/boringssl/src/crypto/x509/x509spki.c +62 -63
- package/third_party/boringssl/src/crypto/x509/x_algor.c +64 -62
- package/third_party/boringssl/src/crypto/x509/x_all.c +103 -133
- package/third_party/boringssl/src/crypto/x509/x_attrib.c +23 -24
- package/third_party/boringssl/src/crypto/x509/x_crl.c +310 -321
- package/third_party/boringssl/src/crypto/x509/x_exten.c +6 -5
- package/third_party/boringssl/src/crypto/x509/x_info.c +31 -28
- package/third_party/boringssl/src/crypto/x509/x_name.c +361 -365
- package/third_party/boringssl/src/crypto/x509/x_pkey.c +38 -32
- package/third_party/boringssl/src/crypto/x509/x_pubkey.c +114 -117
- package/third_party/boringssl/src/crypto/x509/x_req.c +27 -29
- package/third_party/boringssl/src/crypto/x509/x_sig.c +2 -2
- package/third_party/boringssl/src/crypto/x509/x_spki.c +8 -10
- package/third_party/boringssl/src/crypto/x509/x_val.c +2 -2
- package/third_party/boringssl/src/crypto/x509/x_x509.c +212 -226
- package/third_party/boringssl/src/crypto/x509/x_x509a.c +112 -109
- package/third_party/boringssl/src/crypto/x509v3/ext_dat.h +10 -13
- package/third_party/boringssl/src/crypto/x509v3/internal.h +72 -87
- package/third_party/boringssl/src/crypto/x509v3/pcy_cache.c +184 -176
- package/third_party/boringssl/src/crypto/x509v3/pcy_data.c +58 -56
- package/third_party/boringssl/src/crypto/x509v3/pcy_lib.c +71 -70
- package/third_party/boringssl/src/crypto/x509v3/pcy_map.c +56 -58
- package/third_party/boringssl/src/crypto/x509v3/pcy_node.c +89 -91
- package/third_party/boringssl/src/crypto/x509v3/pcy_tree.c +585 -590
- package/third_party/boringssl/src/crypto/x509v3/v3_akey.c +118 -112
- package/third_party/boringssl/src/crypto/x509v3/v3_akeya.c +3 -3
- package/third_party/boringssl/src/crypto/x509v3/v3_alt.c +447 -451
- package/third_party/boringssl/src/crypto/x509v3/v3_bcons.c +44 -38
- package/third_party/boringssl/src/crypto/x509v3/v3_bitst.c +39 -43
- package/third_party/boringssl/src/crypto/x509v3/v3_conf.c +321 -320
- package/third_party/boringssl/src/crypto/x509v3/v3_cpols.c +352 -327
- package/third_party/boringssl/src/crypto/x509v3/v3_crld.c +437 -383
- package/third_party/boringssl/src/crypto/x509v3/v3_enum.c +23 -16
- package/third_party/boringssl/src/crypto/x509v3/v3_extku.c +62 -53
- package/third_party/boringssl/src/crypto/x509v3/v3_genn.c +118 -115
- package/third_party/boringssl/src/crypto/x509v3/v3_ia5.c +30 -31
- package/third_party/boringssl/src/crypto/x509v3/v3_info.c +112 -98
- package/third_party/boringssl/src/crypto/x509v3/v3_int.c +40 -15
- package/third_party/boringssl/src/crypto/x509v3/v3_lib.c +248 -252
- package/third_party/boringssl/src/crypto/x509v3/v3_ncons.c +390 -386
- package/third_party/boringssl/src/crypto/x509v3/v3_ocsp.c +45 -32
- package/third_party/boringssl/src/crypto/x509v3/v3_pci.c +206 -209
- package/third_party/boringssl/src/crypto/x509v3/v3_pcia.c +6 -8
- package/third_party/boringssl/src/crypto/x509v3/v3_pcons.c +54 -50
- package/third_party/boringssl/src/crypto/x509v3/v3_pmaps.c +66 -65
- package/third_party/boringssl/src/crypto/x509v3/v3_prn.c +144 -133
- package/third_party/boringssl/src/crypto/x509v3/v3_purp.c +695 -709
- package/third_party/boringssl/src/crypto/x509v3/v3_skey.c +75 -69
- package/third_party/boringssl/src/crypto/x509v3/v3_utl.c +1102 -1082
- package/third_party/boringssl/src/include/openssl/base.h +3 -1
- package/third_party/boringssl/src/include/openssl/bn.h +3 -0
- package/third_party/boringssl/src/include/openssl/bytestring.h +20 -0
- package/third_party/boringssl/src/include/openssl/evp.h +6 -5
- package/third_party/boringssl/src/include/openssl/kdf.h +91 -0
- package/third_party/boringssl/src/include/openssl/nid.h +4 -0
- package/third_party/boringssl/src/include/openssl/ssl.h +6 -1
- package/third_party/boringssl/src/include/openssl/stack.h +47 -32
- package/third_party/boringssl/src/include/openssl/trust_token.h +18 -3
- package/third_party/boringssl/src/include/openssl/x509.h +18 -0
- package/third_party/boringssl/src/ssl/ssl_file.cc +61 -99
- package/third_party/boringssl/src/ssl/ssl_test.cc +101 -0
- package/third_party/boringssl/src/util/doc.config +2 -1
- package/third_party/boringssl/src/util/fipstools/acvp/acvptool/subprocess/subprocess.go +8 -0
- package/third_party/googleurl/AUTHORS +16 -2
- package/third_party/googleurl/base/BUILD +1 -0
- package/third_party/googleurl/base/compiler_specific.h +16 -17
- package/third_party/googleurl/base/containers/contiguous_iterator.h +13 -9
- package/third_party/googleurl/base/containers/span.h +23 -8
- package/third_party/googleurl/base/memory/raw_ptr.h +17 -25
- package/third_party/googleurl/base/memory/raw_ptr_exclusion.h +21 -0
- package/third_party/googleurl/base/strings/escape.cc +14 -2
- package/third_party/googleurl/base/strings/safe_sprintf.h +1 -1
- package/third_party/googleurl/base/strings/string_number_conversions.cc +5 -3
- package/third_party/googleurl/base/strings/string_number_conversions_internal.h +5 -5
- package/third_party/googleurl/base/strings/string_piece.h +3 -3
- package/third_party/googleurl/base/strings/string_util.cc +4 -27
- package/third_party/googleurl/base/strings/string_util.h +43 -8
- package/third_party/googleurl/base/strings/string_util_internal.h +11 -12
- package/third_party/googleurl/base/strings/string_util_unittest.cc +33 -0
- package/third_party/googleurl/base/strings/string_util_win.cc +0 -5
- package/third_party/googleurl/base/strings/string_util_win.h +9 -1
- package/third_party/googleurl/base/strings/utf_offset_string_conversions.cc +1 -1
- package/third_party/googleurl/base/strings/utf_string_conversion_utils.cc +5 -8
- package/third_party/googleurl/base/strings/utf_string_conversion_utils.h +13 -10
- package/third_party/googleurl/base/strings/utf_string_conversions.cc +32 -25
- package/third_party/googleurl/base/template_util.h +23 -35
- package/third_party/googleurl/build/build_config.h +14 -3
- package/third_party/googleurl/copy.bara.sky +1 -1
- package/third_party/googleurl/url/gurl.cc +8 -4
- package/third_party/googleurl/url/gurl.h +1 -0
- package/third_party/googleurl/url/gurl_unittest.cc +1 -0
- package/third_party/googleurl/url/origin.h +36 -26
- package/third_party/googleurl/url/scheme_host_port.h +4 -1
- package/third_party/googleurl/url/url_canon.h +2 -1
- package/third_party/googleurl/url/url_canon_internal.cc +9 -7
- package/third_party/googleurl/url/url_canon_internal.h +16 -16
- package/third_party/googleurl/url/url_canon_stdstring.h +2 -1
- package/third_party/googleurl/url/url_util.cc +9 -8
- package/third_party/quiche/build/source_list.bzl +7 -0
- package/third_party/quiche/build/source_list.gni +7 -0
- package/third_party/quiche/build/source_list.json +7 -0
- package/third_party/quiche/quiche/common/platform/api/quiche_mem_slice.h +7 -3
- package/third_party/quiche/quiche/http2/adapter/nghttp2_adapter_test.cc +86 -2
- package/third_party/quiche/quiche/http2/adapter/oghttp2_adapter_test.cc +104 -2
- package/third_party/quiche/quiche/http2/adapter/oghttp2_session.cc +23 -0
- package/third_party/quiche/quiche/http2/adapter/oghttp2_session.h +6 -1
- package/third_party/quiche/quiche/quic/core/congestion_control/send_algorithm_test.cc +0 -16
- package/third_party/quiche/quiche/quic/core/crypto/crypto_protocol.h +1 -1
- package/third_party/quiche/quiche/quic/core/http/end_to_end_test.cc +56 -2
- package/third_party/quiche/quiche/quic/core/http/http_constants.cc +1 -0
- package/third_party/quiche/quiche/quic/core/http/http_constants.h +1 -0
- package/third_party/quiche/quiche/quic/core/http/http_encoder.cc +28 -17
- package/third_party/quiche/quiche/quic/core/http/http_encoder.h +5 -0
- package/third_party/quiche/quiche/quic/core/http/http_encoder_test.cc +26 -30
- package/third_party/quiche/quiche/quic/core/http/http_frames.h +1 -0
- package/third_party/quiche/quiche/quic/core/http/quic_server_session_base.cc +4 -4
- package/third_party/quiche/quiche/quic/core/http/quic_server_session_base_test.cc +1 -1
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_client_session.cc +5 -1
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.cc +6 -33
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.h +0 -17
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream_test.cc +5 -20
- package/third_party/quiche/quiche/quic/core/io/quic_event_loop.h +81 -0
- package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop.cc +265 -0
- package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop.h +152 -0
- package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop_test.cc +341 -0
- package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store.cc +3 -1
- package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store.h +7 -7
- package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store_test.cc +4 -3
- package/third_party/quiche/quiche/quic/core/quic_connection.cc +69 -19
- package/third_party/quiche/quiche/quic/core/quic_connection.h +9 -3
- package/third_party/quiche/quiche/quic/core/quic_connection_id_manager.cc +29 -10
- package/third_party/quiche/quiche/quic/core/quic_connection_id_manager.h +5 -3
- package/third_party/quiche/quiche/quic/core/quic_connection_id_manager_test.cc +85 -22
- package/third_party/quiche/quiche/quic/core/quic_connection_test.cc +186 -30
- package/third_party/quiche/quiche/quic/core/quic_crypto_stream.cc +2 -1
- package/third_party/quiche/quiche/quic/core/quic_default_clock.cc +31 -0
- package/third_party/quiche/quiche/quic/core/quic_default_clock.h +34 -0
- package/third_party/quiche/quiche/quic/core/quic_default_connection_helper.h +49 -0
- package/third_party/quiche/quiche/quic/core/quic_dispatcher.cc +53 -37
- package/third_party/quiche/quiche/quic/core/quic_dispatcher.h +19 -11
- package/third_party/quiche/quiche/quic/core/quic_dispatcher_test.cc +15 -2
- package/third_party/quiche/quiche/quic/core/quic_flags_list.h +10 -4
- package/third_party/quiche/quiche/quic/core/quic_idle_network_detector.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_idle_network_detector_test.cc +4 -4
- package/third_party/quiche/quiche/quic/core/quic_packet_creator.cc +14 -3
- package/third_party/quiche/quiche/quic/core/quic_packet_creator_test.cc +145 -2
- package/third_party/quiche/quiche/quic/core/quic_packets.cc +3 -1
- package/third_party/quiche/quiche/quic/core/quic_packets.h +4 -0
- package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager.cc +13 -11
- package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager.h +9 -0
- package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager_test.cc +6 -0
- package/third_party/quiche/quiche/quic/core/quic_session.cc +3 -2
- package/third_party/quiche/quiche/quic/core/quic_session.h +8 -3
- package/third_party/quiche/quiche/quic/core/quic_types.cc +18 -0
- package/third_party/quiche/quiche/quic/core/quic_types.h +3 -0
- package/third_party/quiche/quiche/quic/core/tls_chlo_extractor.cc +3 -0
- package/third_party/quiche/quiche/quic/core/tls_chlo_extractor.h +10 -0
- package/third_party/quiche/quiche/quic/test_tools/mock_quic_session_visitor.h +1 -1
- package/third_party/quiche/quiche/quic/test_tools/quic_test_utils.h +1 -1
- package/third_party/quiche/quiche/quic/test_tools/server_thread.cc +3 -2
- package/third_party/quiche/quiche/quic/test_tools/simple_session_notifier.cc +7 -1
- package/third_party/quiche/quiche/quic/test_tools/simple_session_notifier.h +3 -0
- package/third_party/quiche/quiche/quic/test_tools/simulator/quic_endpoint.h +4 -2
- package/certs/ca.cnf +0 -69
- package/certs/generate_certs.sh +0 -53
- package/certs/generate_certs_leaf.sh +0 -53
- package/certs/leaf.cnf +0 -24
- package/certs/readme.txt +0 -2
- package/third_party/quiche/build/BUILD.bazel +0 -7
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright 2022 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
#ifndef QUICHE_QUIC_CORE_QUIC_DEFAULT_CLOCK_H_
|
|
6
|
+
#define QUICHE_QUIC_CORE_QUIC_DEFAULT_CLOCK_H_
|
|
7
|
+
|
|
8
|
+
#include "quiche/quic/core/quic_clock.h"
|
|
9
|
+
#include "quiche/quic/core/quic_time.h"
|
|
10
|
+
#include "quiche/quic/platform/api/quic_export.h"
|
|
11
|
+
|
|
12
|
+
namespace quic {
|
|
13
|
+
|
|
14
|
+
// A QuicClock based on Abseil time API. Thread-safe.
|
|
15
|
+
class QUIC_EXPORT_PRIVATE QuicDefaultClock : public QuicClock {
|
|
16
|
+
public:
|
|
17
|
+
// Provides a single default stateless instance of QuicDefaultClock.
|
|
18
|
+
static QuicDefaultClock* Get();
|
|
19
|
+
|
|
20
|
+
explicit QuicDefaultClock() = default;
|
|
21
|
+
QuicDefaultClock(const QuicDefaultClock&) = delete;
|
|
22
|
+
QuicDefaultClock& operator=(const QuicDefaultClock&) = delete;
|
|
23
|
+
|
|
24
|
+
// QuicClock implementation.
|
|
25
|
+
QuicTime ApproximateNow() const override;
|
|
26
|
+
QuicTime Now() const override;
|
|
27
|
+
QuicWallTime WallNow() const override;
|
|
28
|
+
QuicTime ConvertWallTimeToQuicTime(
|
|
29
|
+
const QuicWallTime& walltime) const override;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
} // namespace quic
|
|
33
|
+
|
|
34
|
+
#endif // QUICHE_QUIC_CORE_QUIC_DEFAULT_CLOCK_H_
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Copyright 2022 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
#ifndef QUICHE_QUIC_CORE_QUIC_DEFAULT_CONNECTION_HELPER_H_
|
|
6
|
+
#define QUICHE_QUIC_CORE_QUIC_DEFAULT_CONNECTION_HELPER_H_
|
|
7
|
+
|
|
8
|
+
#include "quiche/quic/core/crypto/quic_random.h"
|
|
9
|
+
#include "quiche/quic/core/quic_connection.h"
|
|
10
|
+
#include "quiche/quic/core/quic_default_clock.h"
|
|
11
|
+
#include "quiche/common/simple_buffer_allocator.h"
|
|
12
|
+
|
|
13
|
+
namespace quic {
|
|
14
|
+
|
|
15
|
+
// A default implementation of QuicConnectionHelperInterface. Thread-safe.
|
|
16
|
+
class QUIC_EXPORT_PRIVATE QuicDefaultConnectionHelper
|
|
17
|
+
: public QuicConnectionHelperInterface {
|
|
18
|
+
public:
|
|
19
|
+
static QuicDefaultConnectionHelper* Get() {
|
|
20
|
+
static QuicDefaultConnectionHelper* helper =
|
|
21
|
+
new QuicDefaultConnectionHelper();
|
|
22
|
+
return helper;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Creates a helper that uses the default allocator.
|
|
26
|
+
QuicDefaultConnectionHelper() : QuicDefaultConnectionHelper(nullptr) {}
|
|
27
|
+
// If |allocator| is nullptr, the default one is used.
|
|
28
|
+
QuicDefaultConnectionHelper(
|
|
29
|
+
std::unique_ptr<quiche::QuicheBufferAllocator> allocator)
|
|
30
|
+
: allocator_(std::move(allocator)) {}
|
|
31
|
+
|
|
32
|
+
QuicDefaultConnectionHelper(const QuicDefaultConnectionHelper&) = delete;
|
|
33
|
+
QuicDefaultConnectionHelper& operator=(const QuicDefaultConnectionHelper&) =
|
|
34
|
+
delete;
|
|
35
|
+
|
|
36
|
+
const QuicClock* GetClock() const override { return QuicDefaultClock::Get(); }
|
|
37
|
+
QuicRandom* GetRandomGenerator() override {
|
|
38
|
+
return QuicRandom::GetInstance();
|
|
39
|
+
}
|
|
40
|
+
quiche::QuicheBufferAllocator* GetStreamSendBufferAllocator() override {
|
|
41
|
+
return allocator_ ? allocator_.get() : quiche::SimpleBufferAllocator::Get();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
private:
|
|
45
|
+
std::unique_ptr<quiche::QuicheBufferAllocator> allocator_;
|
|
46
|
+
};
|
|
47
|
+
} // namespace quic
|
|
48
|
+
|
|
49
|
+
#endif // QUICHE_QUIC_CORE_QUIC_DEFAULT_CONNECTION_HELPER_H_
|
|
@@ -255,6 +255,7 @@ bool MaybeHandleLegacyVersionEncapsulation(
|
|
|
255
255
|
QuicDispatcher* dispatcher,
|
|
256
256
|
std::string legacy_version_encapsulation_inner_packet,
|
|
257
257
|
const ReceivedPacketInfo& packet_info) {
|
|
258
|
+
QUICHE_DCHECK(!GetQuicRestartFlag(quic_disable_legacy_version_encapsulation));
|
|
258
259
|
if (legacy_version_encapsulation_inner_packet.empty()) {
|
|
259
260
|
// This CHLO did not contain the Legacy Version Encapsulation tag.
|
|
260
261
|
return false;
|
|
@@ -587,16 +588,21 @@ bool QuicDispatcher::MaybeDispatchPacket(
|
|
|
587
588
|
packet_info.version == LegacyVersionForEncapsulation()) {
|
|
588
589
|
// This packet is using the Legacy Version Encapsulation version but the
|
|
589
590
|
// corresponding session isn't, attempt extraction of inner packet.
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
if (
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
591
|
+
if (GetQuicRestartFlag(quic_disable_legacy_version_encapsulation)) {
|
|
592
|
+
QUIC_CODE_COUNT(
|
|
593
|
+
quic_disable_legacy_version_encapsulation_dispatch_packet);
|
|
594
|
+
} else {
|
|
595
|
+
ChloAlpnSniExtractor alpn_extractor;
|
|
596
|
+
if (ChloExtractor::Extract(packet_info.packet, packet_info.version,
|
|
597
|
+
config_->create_session_tag_indicators(),
|
|
598
|
+
&alpn_extractor,
|
|
599
|
+
server_connection_id.length())) {
|
|
600
|
+
if (MaybeHandleLegacyVersionEncapsulation(
|
|
601
|
+
this,
|
|
602
|
+
alpn_extractor.ConsumeLegacyVersionEncapsulationInnerPacket(),
|
|
603
|
+
packet_info)) {
|
|
604
|
+
return true;
|
|
605
|
+
}
|
|
600
606
|
}
|
|
601
607
|
}
|
|
602
608
|
}
|
|
@@ -711,8 +717,9 @@ void QuicDispatcher::ProcessHeader(ReceivedPacketInfo* packet_info) {
|
|
|
711
717
|
QuicPacketFate fate = ValidityChecks(*packet_info);
|
|
712
718
|
|
|
713
719
|
if (fate == kFateProcess) {
|
|
714
|
-
|
|
720
|
+
ExtractChloResult extract_chlo_result =
|
|
715
721
|
TryExtractChloOrBufferEarlyPacket(*packet_info);
|
|
722
|
+
auto& parsed_chlo = extract_chlo_result.parsed_chlo;
|
|
716
723
|
if (!parsed_chlo.has_value()) {
|
|
717
724
|
// Client Hello incomplete. Packet has been buffered or (rarely) dropped.
|
|
718
725
|
return;
|
|
@@ -725,10 +732,17 @@ void QuicDispatcher::ProcessHeader(ReceivedPacketInfo* packet_info) {
|
|
|
725
732
|
QUICHE_DCHECK(
|
|
726
733
|
parsed_chlo->legacy_version_encapsulation_inner_packet.empty() ||
|
|
727
734
|
!packet_info->version.UsesTls());
|
|
728
|
-
if (
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
735
|
+
if (GetQuicRestartFlag(quic_disable_legacy_version_encapsulation)) {
|
|
736
|
+
if (!parsed_chlo->legacy_version_encapsulation_inner_packet.empty()) {
|
|
737
|
+
QUIC_CODE_COUNT(
|
|
738
|
+
quic_disable_legacy_version_encapsulation_process_header);
|
|
739
|
+
}
|
|
740
|
+
} else {
|
|
741
|
+
if (MaybeHandleLegacyVersionEncapsulation(
|
|
742
|
+
this, parsed_chlo->legacy_version_encapsulation_inner_packet,
|
|
743
|
+
*packet_info)) {
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
732
746
|
}
|
|
733
747
|
|
|
734
748
|
ProcessChlo(*std::move(parsed_chlo), packet_info);
|
|
@@ -767,9 +781,10 @@ void QuicDispatcher::ProcessHeader(ReceivedPacketInfo* packet_info) {
|
|
|
767
781
|
}
|
|
768
782
|
}
|
|
769
783
|
|
|
770
|
-
|
|
784
|
+
QuicDispatcher::ExtractChloResult
|
|
771
785
|
QuicDispatcher::TryExtractChloOrBufferEarlyPacket(
|
|
772
786
|
const ReceivedPacketInfo& packet_info) {
|
|
787
|
+
ExtractChloResult result;
|
|
773
788
|
if (packet_info.version.UsesTls()) {
|
|
774
789
|
bool has_full_tls_chlo = false;
|
|
775
790
|
std::string sni;
|
|
@@ -782,7 +797,7 @@ QuicDispatcher::TryExtractChloOrBufferEarlyPacket(
|
|
|
782
797
|
has_full_tls_chlo = buffered_packets_.IngestPacketForTlsChloExtraction(
|
|
783
798
|
packet_info.destination_connection_id, packet_info.version,
|
|
784
799
|
packet_info.packet, &alpns, &sni, &resumption_attempted,
|
|
785
|
-
&early_data_attempted);
|
|
800
|
+
&early_data_attempted, &result.tls_alert);
|
|
786
801
|
} else {
|
|
787
802
|
// If we do not have a BufferedPacketList for this connection ID,
|
|
788
803
|
// create a single-use one to check whether this packet contains a
|
|
@@ -796,6 +811,8 @@ QuicDispatcher::TryExtractChloOrBufferEarlyPacket(
|
|
|
796
811
|
sni = tls_chlo_extractor.server_name();
|
|
797
812
|
resumption_attempted = tls_chlo_extractor.resumption_attempted();
|
|
798
813
|
early_data_attempted = tls_chlo_extractor.early_data_attempted();
|
|
814
|
+
} else {
|
|
815
|
+
result.tls_alert = tls_chlo_extractor.tls_alert();
|
|
799
816
|
}
|
|
800
817
|
}
|
|
801
818
|
if (!has_full_tls_chlo) {
|
|
@@ -803,10 +820,10 @@ QuicDispatcher::TryExtractChloOrBufferEarlyPacket(
|
|
|
803
820
|
// packet that arrived before the CHLO (due to loss or reordering),
|
|
804
821
|
// or it could be a fragment of a multi-packet CHLO.
|
|
805
822
|
BufferEarlyPacket(packet_info);
|
|
806
|
-
return
|
|
823
|
+
return result;
|
|
807
824
|
}
|
|
808
825
|
|
|
809
|
-
ParsedClientHello parsed_chlo;
|
|
826
|
+
ParsedClientHello& parsed_chlo = result.parsed_chlo.emplace();
|
|
810
827
|
parsed_chlo.sni = std::move(sni);
|
|
811
828
|
parsed_chlo.alpns = std::move(alpns);
|
|
812
829
|
if (packet_info.retry_token.has_value()) {
|
|
@@ -814,7 +831,7 @@ QuicDispatcher::TryExtractChloOrBufferEarlyPacket(
|
|
|
814
831
|
}
|
|
815
832
|
parsed_chlo.resumption_attempted = resumption_attempted;
|
|
816
833
|
parsed_chlo.early_data_attempted = early_data_attempted;
|
|
817
|
-
return
|
|
834
|
+
return result;
|
|
818
835
|
}
|
|
819
836
|
|
|
820
837
|
ChloAlpnSniExtractor alpn_extractor;
|
|
@@ -825,7 +842,7 @@ QuicDispatcher::TryExtractChloOrBufferEarlyPacket(
|
|
|
825
842
|
packet_info.destination_connection_id.length())) {
|
|
826
843
|
// Buffer non-CHLO packets.
|
|
827
844
|
BufferEarlyPacket(packet_info);
|
|
828
|
-
return
|
|
845
|
+
return result;
|
|
829
846
|
}
|
|
830
847
|
|
|
831
848
|
// We only apply this check for versions that do not use the IETF
|
|
@@ -838,16 +855,16 @@ QuicDispatcher::TryExtractChloOrBufferEarlyPacket(
|
|
|
838
855
|
QUIC_DVLOG(1) << "Dropping CHLO packet which is too short, length: "
|
|
839
856
|
<< packet_info.packet.length();
|
|
840
857
|
QUIC_CODE_COUNT(quic_drop_small_chlo_packets);
|
|
841
|
-
return
|
|
858
|
+
return result;
|
|
842
859
|
}
|
|
843
860
|
|
|
844
|
-
ParsedClientHello parsed_chlo;
|
|
861
|
+
ParsedClientHello& parsed_chlo = result.parsed_chlo.emplace();
|
|
845
862
|
parsed_chlo.legacy_version_encapsulation_inner_packet =
|
|
846
863
|
alpn_extractor.ConsumeLegacyVersionEncapsulationInnerPacket();
|
|
847
864
|
parsed_chlo.sni = alpn_extractor.ConsumeSni();
|
|
848
865
|
parsed_chlo.uaid = alpn_extractor.ConsumeUaid();
|
|
849
866
|
parsed_chlo.alpns = {alpn_extractor.ConsumeAlpn()};
|
|
850
|
-
return
|
|
867
|
+
return result;
|
|
851
868
|
}
|
|
852
869
|
|
|
853
870
|
std::string QuicDispatcher::SelectAlpn(const std::vector<std::string>& alpns) {
|
|
@@ -1051,15 +1068,13 @@ void QuicDispatcher::OnConnectionClosed(QuicConnectionId server_connection_id,
|
|
|
1051
1068
|
<< ", with details: " << error_details;
|
|
1052
1069
|
|
|
1053
1070
|
QuicConnection* connection = it->second->connection();
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
QuicTime::Delta::Zero());
|
|
1060
|
-
}
|
|
1061
|
-
closed_session_list_.push_back(std::move(it->second));
|
|
1071
|
+
// Set up alarm to fire immediately to bring destruction of this session
|
|
1072
|
+
// out of current call stack.
|
|
1073
|
+
if (closed_session_list_.empty()) {
|
|
1074
|
+
delete_sessions_alarm_->Update(helper()->GetClock()->ApproximateNow(),
|
|
1075
|
+
QuicTime::Delta::Zero());
|
|
1062
1076
|
}
|
|
1077
|
+
closed_session_list_.push_back(std::move(it->second));
|
|
1063
1078
|
CleanUpSession(it->first, connection, error, error_details, source);
|
|
1064
1079
|
for (const QuicConnectionId& cid :
|
|
1065
1080
|
connection->GetActiveServerConnectionIds()) {
|
|
@@ -1088,7 +1103,7 @@ void QuicDispatcher::OnRstStreamReceived(const QuicRstStreamFrame& /*frame*/) {}
|
|
|
1088
1103
|
void QuicDispatcher::OnStopSendingReceived(
|
|
1089
1104
|
const QuicStopSendingFrame& /*frame*/) {}
|
|
1090
1105
|
|
|
1091
|
-
|
|
1106
|
+
bool QuicDispatcher::TryAddNewConnectionId(
|
|
1092
1107
|
const QuicConnectionId& server_connection_id,
|
|
1093
1108
|
const QuicConnectionId& new_connection_id) {
|
|
1094
1109
|
auto it = reference_counted_session_map_.find(server_connection_id);
|
|
@@ -1097,13 +1112,16 @@ void QuicDispatcher::OnNewConnectionIdSent(
|
|
|
1097
1112
|
<< "Couldn't locate the session that issues the connection ID in "
|
|
1098
1113
|
"reference_counted_session_map_. server_connection_id:"
|
|
1099
1114
|
<< server_connection_id << " new_connection_id: " << new_connection_id;
|
|
1100
|
-
return;
|
|
1115
|
+
return false;
|
|
1101
1116
|
}
|
|
1102
1117
|
// Count new connection ID added to the dispatcher map.
|
|
1103
1118
|
QUIC_RELOADABLE_FLAG_COUNT_N(quic_connection_migration_use_new_cid_v2, 6, 6);
|
|
1104
1119
|
auto insertion_result = reference_counted_session_map_.insert(
|
|
1105
1120
|
std::make_pair(new_connection_id, it->second));
|
|
1106
|
-
|
|
1121
|
+
if (!insertion_result.second) {
|
|
1122
|
+
QUIC_CODE_COUNT(quic_cid_already_in_session_map);
|
|
1123
|
+
}
|
|
1124
|
+
return insertion_result.second;
|
|
1107
1125
|
}
|
|
1108
1126
|
|
|
1109
1127
|
void QuicDispatcher::OnConnectionIdRetired(
|
|
@@ -1363,8 +1381,6 @@ void QuicDispatcher::ProcessChlo(ParsedClientHello parsed_chlo,
|
|
|
1363
1381
|
--new_sessions_allowed_per_event_loop_;
|
|
1364
1382
|
}
|
|
1365
1383
|
|
|
1366
|
-
bool QuicDispatcher::ShouldDestroySessionAsynchronously() { return true; }
|
|
1367
|
-
|
|
1368
1384
|
void QuicDispatcher::SetLastError(QuicErrorCode error) { last_error_ = error; }
|
|
1369
1385
|
|
|
1370
1386
|
bool QuicDispatcher::OnFailedToDispatchPacket(
|
|
@@ -102,8 +102,9 @@ class QUIC_NO_EXPORT QuicDispatcher
|
|
|
102
102
|
|
|
103
103
|
// QuicSession::Visitor interface implementation (via inheritance of
|
|
104
104
|
// QuicTimeWaitListManager::Visitor):
|
|
105
|
-
//
|
|
106
|
-
|
|
105
|
+
// Try to add the new connection ID to the session map. Returns true on
|
|
106
|
+
// success.
|
|
107
|
+
bool TryAddNewConnectionId(
|
|
107
108
|
const QuicConnectionId& server_connection_id,
|
|
108
109
|
const QuicConnectionId& new_connection_id) override;
|
|
109
110
|
|
|
@@ -244,10 +245,6 @@ class QUIC_NO_EXPORT QuicDispatcher
|
|
|
244
245
|
void ProcessChlo(ParsedClientHello parsed_chlo,
|
|
245
246
|
ReceivedPacketInfo* packet_info);
|
|
246
247
|
|
|
247
|
-
// Return true if dispatcher wants to destroy session outside of
|
|
248
|
-
// OnConnectionClosed() call stack.
|
|
249
|
-
virtual bool ShouldDestroySessionAsynchronously();
|
|
250
|
-
|
|
251
248
|
QuicTimeWaitListManager* time_wait_list_manager() {
|
|
252
249
|
return time_wait_list_manager_.get();
|
|
253
250
|
}
|
|
@@ -370,15 +367,26 @@ class QUIC_NO_EXPORT QuicDispatcher
|
|
|
370
367
|
// ProcessValidatedPacketWithUnknownConnectionId.
|
|
371
368
|
void ProcessHeader(ReceivedPacketInfo* packet_info);
|
|
372
369
|
|
|
370
|
+
struct ExtractChloResult {
|
|
371
|
+
// If set, a full client hello has been successfully parsed.
|
|
372
|
+
absl::optional<ParsedClientHello> parsed_chlo;
|
|
373
|
+
// If set, the TLS alert that will cause a connection close.
|
|
374
|
+
// Always empty for Google QUIC.
|
|
375
|
+
absl::optional<uint8_t> tls_alert;
|
|
376
|
+
};
|
|
377
|
+
|
|
373
378
|
// Try to extract information(sni, alpns, ...) if the full Client Hello has
|
|
374
379
|
// been parsed.
|
|
375
380
|
//
|
|
376
|
-
//
|
|
377
|
-
// successfully parsed.
|
|
381
|
+
// Returns the parsed client hello in ExtractChloResult.parsed_chlo, if the
|
|
382
|
+
// full Client Hello has been successfully parsed.
|
|
383
|
+
//
|
|
384
|
+
// Returns the TLS alert in ExtractChloResult.tls_alert, if the extraction of
|
|
385
|
+
// Client Hello failed due to that alert.
|
|
378
386
|
//
|
|
379
|
-
// Otherwise
|
|
380
|
-
// packet.
|
|
381
|
-
|
|
387
|
+
// Otherwise returns a default-constructed ExtractChloResult and either buffer
|
|
388
|
+
// or (rarely) drop the packet.
|
|
389
|
+
ExtractChloResult TryExtractChloOrBufferEarlyPacket(
|
|
382
390
|
const ReceivedPacketInfo& packet_info);
|
|
383
391
|
|
|
384
392
|
// Deliver |packets| to |session| for further processing.
|
|
@@ -170,7 +170,10 @@ class MockServerConnection : public MockQuicConnection {
|
|
|
170
170
|
active_connection_ids_({connection_id}) {}
|
|
171
171
|
|
|
172
172
|
void AddNewConnectionId(QuicConnectionId id) {
|
|
173
|
-
dispatcher_->
|
|
173
|
+
if (!dispatcher_->TryAddNewConnectionId(active_connection_ids_.back(),
|
|
174
|
+
id)) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
174
177
|
QuicConnectionPeer::SetServerConnectionId(this, id);
|
|
175
178
|
active_connection_ids_.push_back(id);
|
|
176
179
|
}
|
|
@@ -645,6 +648,9 @@ TEST_P(QuicDispatcherTestAllVersions,
|
|
|
645
648
|
}
|
|
646
649
|
|
|
647
650
|
TEST_P(QuicDispatcherTestAllVersions, LegacyVersionEncapsulation) {
|
|
651
|
+
if (GetQuicRestartFlag(quic_disable_legacy_version_encapsulation)) {
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
648
654
|
if (!version_.HasLongHeaderLengths()) {
|
|
649
655
|
// Decapsulating Legacy Version Encapsulation packets from these versions
|
|
650
656
|
// is not currently supported in QuicDispatcher.
|
|
@@ -2240,7 +2246,14 @@ INSTANTIATE_TEST_SUITE_P(
|
|
|
2240
2246
|
::testing::PrintToStringParamName());
|
|
2241
2247
|
|
|
2242
2248
|
TEST_P(QuicDispatcherSupportMultipleConnectionIdPerConnectionTest,
|
|
2243
|
-
|
|
2249
|
+
FailToAddExistingConnectionId) {
|
|
2250
|
+
AddConnection1();
|
|
2251
|
+
EXPECT_FALSE(dispatcher_->TryAddNewConnectionId(TestConnectionId(1),
|
|
2252
|
+
TestConnectionId(1)));
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
TEST_P(QuicDispatcherSupportMultipleConnectionIdPerConnectionTest,
|
|
2256
|
+
TryAddNewConnectionId) {
|
|
2244
2257
|
AddConnection1();
|
|
2245
2258
|
ASSERT_EQ(dispatcher_->NumSessions(), 1u);
|
|
2246
2259
|
ASSERT_THAT(session1_, testing::NotNull());
|
|
@@ -17,14 +17,18 @@ QUIC_FLAG(quic_restart_flag_quic_testonly_default_false, false)
|
|
|
17
17
|
QUIC_FLAG(quic_restart_flag_quic_testonly_default_true, true)
|
|
18
18
|
// If bytes in flight has dipped below 1.25*MaxBW in the last round, do not exit PROBE_UP due to excess queue buildup.
|
|
19
19
|
QUIC_FLAG(quic_reloadable_flag_quic_bbr2_no_probe_up_exit_if_no_queue, true)
|
|
20
|
+
// If true, 1) remove all experiments that tunes blackhole detection delay or path degrading delay, and 2) ensure network blackhole delay is at least path degrading delay plus 2 PTOs.
|
|
21
|
+
QUIC_FLAG(quic_reloadable_flag_quic_remove_blackhole_detection_experiments, true)
|
|
22
|
+
// If true, QUIC Legacy Version Encapsulation will be disabled.
|
|
23
|
+
QUIC_FLAG(quic_restart_flag_quic_disable_legacy_version_encapsulation, false)
|
|
20
24
|
// If true, QUIC will default enable MTU discovery at server, with a target of 1450 bytes.
|
|
21
25
|
QUIC_FLAG(quic_reloadable_flag_quic_enable_mtu_discovery_at_server, false)
|
|
26
|
+
// If true, QuicConnection::ScopedPacketFlusher::~ScopedPacketFlusher will early return if connection is disconnected after FlushPackets.
|
|
27
|
+
QUIC_FLAG(quic_reloadable_flag_quic_packet_flusher_check_connected_after_flush_packets, true)
|
|
22
28
|
// If true, QuicGsoBatchWriter will support release time if it is available and the process has the permission to do so.
|
|
23
29
|
QUIC_FLAG(quic_restart_flag_quic_support_release_time_for_gso, false)
|
|
24
30
|
// If true, TlsHandshaker::AdvanceHandshake will check if connection is closed after SSL_do_handshake.
|
|
25
31
|
QUIC_FLAG(quic_reloadable_flag_quic_tls_handshaker_check_connection_closed, true)
|
|
26
|
-
// If true, abort async QPACK header decompression in QuicSpdyStream::Reset() and in QuicSpdyStream::OnStreamReset().
|
|
27
|
-
QUIC_FLAG(quic_reloadable_flag_quic_abort_qpack_on_stream_reset, true)
|
|
28
32
|
// If true, ack frequency frame can be sent from server to client.
|
|
29
33
|
QUIC_FLAG(quic_reloadable_flag_quic_can_send_ack_frequency, true)
|
|
30
34
|
// If true, allow client to enable BBRv2 on server via connection option \'B2ON\'.
|
|
@@ -57,6 +61,8 @@ QUIC_FLAG(quic_reloadable_flag_quic_enable_disable_resumption, true)
|
|
|
57
61
|
QUIC_FLAG(quic_reloadable_flag_quic_discard_initial_packet_with_key_dropped, true)
|
|
58
62
|
// If true, do not bundle ACK while sending PATH_CHALLENGE on alternative path.
|
|
59
63
|
QUIC_FLAG(quic_reloadable_flag_quic_not_bundle_ack_on_alternative_path, true)
|
|
64
|
+
// If true, do not issue a new connection ID that has been claimed by another connection.
|
|
65
|
+
QUIC_FLAG(quic_reloadable_flag_quic_check_cid_collision_when_issue_new_cid, false)
|
|
60
66
|
// If true, enable server retransmittable on wire PING.
|
|
61
67
|
QUIC_FLAG(quic_reloadable_flag_quic_enable_server_on_wire_ping, true)
|
|
62
68
|
// If true, flush pending frames as well as pending padding bytes on connection migration.
|
|
@@ -64,7 +70,7 @@ QUIC_FLAG(quic_reloadable_flag_quic_flush_pending_frames_and_padding_bytes_on_mi
|
|
|
64
70
|
// If true, ietf connection migration is no longer conditioned on connection option RVCM.
|
|
65
71
|
QUIC_FLAG(quic_reloadable_flag_quic_remove_connection_migration_connection_option_v2, false)
|
|
66
72
|
// If true, include offset in QUIC STREAM_DATA_BLOCKED and DATA_BLOCKED frames.
|
|
67
|
-
QUIC_FLAG(quic_reloadable_flag_quic_include_offset_in_blocked_frames,
|
|
73
|
+
QUIC_FLAG(quic_reloadable_flag_quic_include_offset_in_blocked_frames, true)
|
|
68
74
|
// If true, include stream information in idle timeout connection close detail.
|
|
69
75
|
QUIC_FLAG(quic_reloadable_flag_quic_add_stream_info_to_idle_close_detail, true)
|
|
70
76
|
// If true, quic server will send ENABLE_CONNECT_PROTOCOL setting and and endpoint will validate required request/response headers and extended CONNECT mechanism and update code counts of valid/invalid headers.
|
|
@@ -76,7 +82,7 @@ QUIC_FLAG(quic_reloadable_flag_quic_require_handshake_confirmation, false)
|
|
|
76
82
|
// If true, server proactively retires client issued connection ID on reverse path validation failure.
|
|
77
83
|
QUIC_FLAG(quic_reloadable_flag_quic_retire_cid_on_reverse_path_validation_failure, true)
|
|
78
84
|
// If true, server sends bandwidth eastimate when network is idle for a while.
|
|
79
|
-
QUIC_FLAG(
|
|
85
|
+
QUIC_FLAG(quic_restart_flag_quic_enable_sending_bandwidth_estimate_when_network_idle_v2, false)
|
|
80
86
|
// If true, set burst token to 2 in cwnd bootstrapping experiment.
|
|
81
87
|
QUIC_FLAG(quic_reloadable_flag_quic_conservative_bursts, false)
|
|
82
88
|
// If true, stop resetting ideal_next_packet_send_time_ in pacing sender.
|
|
@@ -74,10 +74,10 @@ void QuicIdleNetworkDetector::SetTimeouts(
|
|
|
74
74
|
bandwidth_update_timeout_ = QuicTime::Delta::Infinite();
|
|
75
75
|
|
|
76
76
|
if (GetQuicRestartFlag(
|
|
77
|
-
|
|
77
|
+
quic_enable_sending_bandwidth_estimate_when_network_idle_v2) &&
|
|
78
78
|
handshake_timeout_.IsInfinite()) {
|
|
79
79
|
QUIC_RESTART_FLAG_COUNT_N(
|
|
80
|
-
|
|
80
|
+
quic_enable_sending_bandwidth_estimate_when_network_idle_v2, 1, 3);
|
|
81
81
|
bandwidth_update_timeout_ = idle_network_timeout_ * 0.5;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -103,7 +103,7 @@ TEST_F(QuicIdleNetworkDetectorTest,
|
|
|
103
103
|
/*handshake_timeout=*/QuicTime::Delta::Infinite(),
|
|
104
104
|
/*idle_network_timeout=*/QuicTime::Delta::FromSeconds(600));
|
|
105
105
|
if (!GetQuicRestartFlag(
|
|
106
|
-
|
|
106
|
+
quic_enable_sending_bandwidth_estimate_when_network_idle_v2)) {
|
|
107
107
|
EXPECT_EQ(clock_.Now() + QuicTime::Delta::FromSeconds(600),
|
|
108
108
|
alarm_->deadline());
|
|
109
109
|
|
|
@@ -141,7 +141,7 @@ TEST_F(QuicIdleNetworkDetectorTest,
|
|
|
141
141
|
// Handshake completes in 200ms.
|
|
142
142
|
const bool enable_sending_bandwidth_estimate_when_network_idle =
|
|
143
143
|
GetQuicRestartFlag(
|
|
144
|
-
|
|
144
|
+
quic_enable_sending_bandwidth_estimate_when_network_idle_v2);
|
|
145
145
|
clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(200));
|
|
146
146
|
detector_->OnPacketReceived(clock_.Now());
|
|
147
147
|
detector_->SetTimeouts(
|
|
@@ -195,7 +195,7 @@ TEST_F(QuicIdleNetworkDetectorTest, ShorterIdleTimeoutOnSentPacket) {
|
|
|
195
195
|
detector_->enable_shorter_idle_timeout_on_sent_packet();
|
|
196
196
|
QuicTime::Delta idle_network_timeout = QuicTime::Delta::Zero();
|
|
197
197
|
if (GetQuicRestartFlag(
|
|
198
|
-
|
|
198
|
+
quic_enable_sending_bandwidth_estimate_when_network_idle_v2)) {
|
|
199
199
|
idle_network_timeout = QuicTime::Delta::FromSeconds(60);
|
|
200
200
|
} else {
|
|
201
201
|
idle_network_timeout = QuicTime::Delta::FromSeconds(30);
|
|
@@ -250,7 +250,7 @@ TEST_F(QuicIdleNetworkDetectorTest, NoAlarmAfterStopped) {
|
|
|
250
250
|
TEST_F(QuicIdleNetworkDetectorTest,
|
|
251
251
|
ResetBandwidthTimeoutWhenHandshakeTimeoutIsSet) {
|
|
252
252
|
if (!GetQuicRestartFlag(
|
|
253
|
-
|
|
253
|
+
quic_enable_sending_bandwidth_estimate_when_network_idle_v2)) {
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
256
|
detector_->SetTimeouts(
|
|
@@ -476,6 +476,12 @@ void QuicPacketCreator::OnSerializedPacket() {
|
|
|
476
476
|
QUIC_BUG_IF(quic_bug_12398_5, packet_.encrypted_buffer == nullptr)
|
|
477
477
|
<< ENDPOINT;
|
|
478
478
|
|
|
479
|
+
// Clear bytes_not_retransmitted for packets containing only
|
|
480
|
+
// NOT_RETRANSMISSION frames.
|
|
481
|
+
if (packet_.transmission_type == NOT_RETRANSMISSION) {
|
|
482
|
+
packet_.bytes_not_retransmitted.reset();
|
|
483
|
+
}
|
|
484
|
+
|
|
479
485
|
SerializedPacket packet(std::move(packet_));
|
|
480
486
|
ClearPacket();
|
|
481
487
|
RemoveSoftMaxPacketLength();
|
|
@@ -499,6 +505,7 @@ void QuicPacketCreator::ClearPacket() {
|
|
|
499
505
|
QUICHE_DCHECK(packet_.nonretransmittable_frames.empty()) << ENDPOINT;
|
|
500
506
|
packet_.largest_acked.Clear();
|
|
501
507
|
needs_full_padding_ = false;
|
|
508
|
+
packet_.bytes_not_retransmitted.reset();
|
|
502
509
|
}
|
|
503
510
|
|
|
504
511
|
size_t QuicPacketCreator::ReserializeInitialPacketInCoalescedPacket(
|
|
@@ -1795,9 +1802,13 @@ bool QuicPacketCreator::AddFrame(const QuicFrame& frame,
|
|
|
1795
1802
|
debug_delegate_->OnFrameAddedToPacket(frame);
|
|
1796
1803
|
}
|
|
1797
1804
|
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1805
|
+
if (transmission_type == NOT_RETRANSMISSION) {
|
|
1806
|
+
packet_.bytes_not_retransmitted.emplace(
|
|
1807
|
+
packet_.bytes_not_retransmitted.value_or(0) + frame_len);
|
|
1808
|
+
} else if (QuicUtils::IsRetransmittableFrame(frame.type)) {
|
|
1809
|
+
// Packet transmission type is determined by the last added retransmittable
|
|
1810
|
+
// frame of a retransmission type. If a packet has no retransmittable
|
|
1811
|
+
// retransmission frames, it has type NOT_RETRANSMISSION.
|
|
1801
1812
|
packet_.transmission_type = transmission_type;
|
|
1802
1813
|
}
|
|
1803
1814
|
return true;
|