@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.
Files changed (300) hide show
  1. package/package.json +1 -1
  2. package/readme.md +1 -3
  3. package/src/http3eventloop.cc +83 -9
  4. package/src/http3eventloop.h +13 -3
  5. package/src/http3server.cc +22 -22
  6. package/src/http3server.h +7 -20
  7. package/src/http3wtstreamvisitor.cc +31 -10
  8. package/src/http3wtstreamvisitor.h +38 -11
  9. package/src/webtransport.js +91 -23
  10. package/test/echoserver.js +29 -5
  11. package/test/testsuite.js +242 -220
  12. package/third_party/boringssl/src/CMakeLists.txt +2 -0
  13. package/third_party/boringssl/src/crypto/CMakeLists.txt +1 -0
  14. package/third_party/boringssl/src/crypto/asn1/a_bitstr.c +174 -177
  15. package/third_party/boringssl/src/crypto/asn1/a_bool.c +46 -48
  16. package/third_party/boringssl/src/crypto/asn1/a_d2i_fp.c +21 -23
  17. package/third_party/boringssl/src/crypto/asn1/a_dup.c +21 -23
  18. package/third_party/boringssl/src/crypto/asn1/a_gentm.c +84 -187
  19. package/third_party/boringssl/src/crypto/asn1/a_i2d_fp.c +19 -21
  20. package/third_party/boringssl/src/crypto/asn1/a_int.c +305 -329
  21. package/third_party/boringssl/src/crypto/asn1/a_mbstr.c +190 -195
  22. package/third_party/boringssl/src/crypto/asn1/a_object.c +182 -189
  23. package/third_party/boringssl/src/crypto/asn1/a_octet.c +6 -9
  24. package/third_party/boringssl/src/crypto/asn1/a_print.c +15 -16
  25. package/third_party/boringssl/src/crypto/asn1/a_strex.c +386 -399
  26. package/third_party/boringssl/src/crypto/asn1/a_strnid.c +110 -131
  27. package/third_party/boringssl/src/crypto/asn1/a_time.c +118 -111
  28. package/third_party/boringssl/src/crypto/asn1/a_type.c +59 -60
  29. package/third_party/boringssl/src/crypto/asn1/a_utctm.c +114 -186
  30. package/third_party/boringssl/src/crypto/asn1/a_utf8.c +171 -159
  31. package/third_party/boringssl/src/crypto/asn1/asn1_lib.c +245 -260
  32. package/third_party/boringssl/src/crypto/asn1/asn1_par.c +41 -40
  33. package/third_party/boringssl/src/crypto/asn1/asn1_test.cc +31 -0
  34. package/third_party/boringssl/src/crypto/asn1/asn_pack.c +31 -33
  35. package/third_party/boringssl/src/crypto/asn1/f_int.c +36 -33
  36. package/third_party/boringssl/src/crypto/asn1/f_string.c +29 -26
  37. package/third_party/boringssl/src/crypto/asn1/internal.h +62 -61
  38. package/third_party/boringssl/src/crypto/asn1/tasn_dec.c +706 -702
  39. package/third_party/boringssl/src/crypto/asn1/tasn_enc.c +507 -524
  40. package/third_party/boringssl/src/crypto/asn1/tasn_fre.c +141 -133
  41. package/third_party/boringssl/src/crypto/asn1/tasn_new.c +207 -199
  42. package/third_party/boringssl/src/crypto/asn1/tasn_typ.c +19 -22
  43. package/third_party/boringssl/src/crypto/asn1/tasn_utl.c +24 -24
  44. package/third_party/boringssl/src/crypto/asn1/time_support.c +13 -13
  45. package/third_party/boringssl/src/crypto/bio/connect.c +9 -3
  46. package/third_party/boringssl/src/crypto/bytestring/bytestring_test.cc +125 -1
  47. package/third_party/boringssl/src/crypto/bytestring/cbb.c +4 -7
  48. package/third_party/boringssl/src/crypto/bytestring/cbs.c +167 -9
  49. package/third_party/boringssl/src/crypto/cipher_extra/e_aesctrhmac.c +0 -2
  50. package/third_party/boringssl/src/crypto/cipher_extra/e_aesgcmsiv.c +23 -54
  51. package/third_party/boringssl/src/crypto/cipher_extra/e_chacha20poly1305.c +0 -2
  52. package/third_party/boringssl/src/crypto/cipher_extra/e_tls.c +0 -2
  53. package/third_party/boringssl/src/crypto/curve25519/curve25519.c +6 -8
  54. package/third_party/boringssl/src/crypto/evp/evp_ctx.c +25 -22
  55. package/third_party/boringssl/src/crypto/evp/internal.h +15 -9
  56. package/third_party/boringssl/src/crypto/evp/p_dsa_asn1.c +2 -0
  57. package/third_party/boringssl/src/crypto/evp/p_ec_asn1.c +2 -0
  58. package/third_party/boringssl/src/crypto/evp/p_ed25519.c +3 -3
  59. package/third_party/boringssl/src/crypto/evp/p_ed25519_asn1.c +10 -7
  60. package/third_party/boringssl/src/crypto/evp/p_hkdf.c +241 -0
  61. package/third_party/boringssl/src/crypto/evp/p_rsa_asn1.c +2 -0
  62. package/third_party/boringssl/src/crypto/evp/p_x25519_asn1.c +1 -0
  63. package/third_party/boringssl/src/crypto/fipsmodule/aes/aes_nohw.c +9 -10
  64. package/third_party/boringssl/src/crypto/fipsmodule/aes/key_wrap.c +2 -6
  65. package/third_party/boringssl/src/crypto/fipsmodule/bn/exponentiation.c +5 -11
  66. package/third_party/boringssl/src/crypto/fipsmodule/bn/internal.h +1 -1
  67. package/third_party/boringssl/src/crypto/fipsmodule/bn/prime.c +2 -0
  68. package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c +10 -26
  69. package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aesccm.c +2 -3
  70. package/third_party/boringssl/src/crypto/fipsmodule/digestsign/digestsign.c +1 -0
  71. package/third_party/boringssl/src/crypto/fipsmodule/ec/p256-nistz.c +44 -43
  72. package/third_party/boringssl/src/crypto/fipsmodule/modes/cbc.c +5 -9
  73. package/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c +14 -21
  74. package/third_party/boringssl/src/crypto/fipsmodule/rand/ctrdrbg.c +8 -8
  75. package/third_party/boringssl/src/crypto/fipsmodule/rand/internal.h +1 -4
  76. package/third_party/boringssl/src/crypto/hkdf/hkdf_test.cc +104 -0
  77. package/third_party/boringssl/src/crypto/internal.h +18 -4
  78. package/third_party/boringssl/src/crypto/lhash/internal.h +13 -1
  79. package/third_party/boringssl/src/crypto/obj/obj_dat.h +4 -1
  80. package/third_party/boringssl/src/crypto/obj/obj_mac.num +1 -0
  81. package/third_party/boringssl/src/crypto/obj/objects.txt +2 -0
  82. package/third_party/boringssl/src/crypto/pem/pem_all.c +77 -86
  83. package/third_party/boringssl/src/crypto/pem/pem_info.c +221 -233
  84. package/third_party/boringssl/src/crypto/pem/pem_lib.c +639 -608
  85. package/third_party/boringssl/src/crypto/pem/pem_oth.c +17 -16
  86. package/third_party/boringssl/src/crypto/pem/pem_pk8.c +133 -142
  87. package/third_party/boringssl/src/crypto/pem/pem_pkey.c +96 -92
  88. package/third_party/boringssl/src/crypto/poly1305/poly1305_vec.c +12 -28
  89. package/third_party/boringssl/src/crypto/siphash/siphash.c +8 -11
  90. package/third_party/boringssl/src/crypto/siphash/siphash_test.cc +5 -7
  91. package/third_party/boringssl/src/crypto/stack/stack.c +33 -16
  92. package/third_party/boringssl/src/crypto/thread_pthread.c +0 -2
  93. package/third_party/boringssl/src/crypto/thread_win.c +0 -2
  94. package/third_party/boringssl/src/crypto/trust_token/internal.h +14 -0
  95. package/third_party/boringssl/src/crypto/trust_token/pmbtoken.c +127 -30
  96. package/third_party/boringssl/src/crypto/trust_token/trust_token.c +40 -0
  97. package/third_party/boringssl/src/crypto/trust_token/trust_token_test.cc +165 -0
  98. package/third_party/boringssl/src/crypto/trust_token/voprf.c +55 -6
  99. package/third_party/boringssl/src/crypto/x509/a_digest.c +23 -24
  100. package/third_party/boringssl/src/crypto/x509/a_sign.c +52 -55
  101. package/third_party/boringssl/src/crypto/x509/a_verify.c +33 -34
  102. package/third_party/boringssl/src/crypto/x509/algorithm.c +17 -18
  103. package/third_party/boringssl/src/crypto/x509/asn1_gen.c +618 -612
  104. package/third_party/boringssl/src/crypto/x509/by_dir.c +320 -337
  105. package/third_party/boringssl/src/crypto/x509/by_file.c +186 -186
  106. package/third_party/boringssl/src/crypto/x509/i2d_pr.c +11 -14
  107. package/third_party/boringssl/src/crypto/x509/internal.h +22 -22
  108. package/third_party/boringssl/src/crypto/x509/name_print.c +155 -150
  109. package/third_party/boringssl/src/crypto/x509/rsa_pss.c +27 -29
  110. package/third_party/boringssl/src/crypto/x509/t_crl.c +67 -70
  111. package/third_party/boringssl/src/crypto/x509/t_req.c +3 -5
  112. package/third_party/boringssl/src/crypto/x509/t_x509.c +280 -251
  113. package/third_party/boringssl/src/crypto/x509/t_x509a.c +52 -47
  114. package/third_party/boringssl/src/crypto/x509/x509.c +3 -4
  115. package/third_party/boringssl/src/crypto/x509/x509_att.c +234 -223
  116. package/third_party/boringssl/src/crypto/x509/x509_cmp.c +286 -296
  117. package/third_party/boringssl/src/crypto/x509/x509_d2.c +37 -32
  118. package/third_party/boringssl/src/crypto/x509/x509_def.c +14 -30
  119. package/third_party/boringssl/src/crypto/x509/x509_ext.c +55 -84
  120. package/third_party/boringssl/src/crypto/x509/x509_lu.c +545 -581
  121. package/third_party/boringssl/src/crypto/x509/x509_obj.c +131 -121
  122. package/third_party/boringssl/src/crypto/x509/x509_req.c +120 -139
  123. package/third_party/boringssl/src/crypto/x509/x509_set.c +128 -142
  124. package/third_party/boringssl/src/crypto/x509/x509_trs.c +185 -193
  125. package/third_party/boringssl/src/crypto/x509/x509_txt.c +70 -72
  126. package/third_party/boringssl/src/crypto/x509/x509_v3.c +172 -161
  127. package/third_party/boringssl/src/crypto/x509/x509_vfy.c +2041 -2053
  128. package/third_party/boringssl/src/crypto/x509/x509_vpm.c +441 -461
  129. package/third_party/boringssl/src/crypto/x509/x509cset.c +152 -170
  130. package/third_party/boringssl/src/crypto/x509/x509name.c +274 -260
  131. package/third_party/boringssl/src/crypto/x509/x509rset.c +43 -20
  132. package/third_party/boringssl/src/crypto/x509/x509spki.c +62 -63
  133. package/third_party/boringssl/src/crypto/x509/x_algor.c +64 -62
  134. package/third_party/boringssl/src/crypto/x509/x_all.c +103 -133
  135. package/third_party/boringssl/src/crypto/x509/x_attrib.c +23 -24
  136. package/third_party/boringssl/src/crypto/x509/x_crl.c +310 -321
  137. package/third_party/boringssl/src/crypto/x509/x_exten.c +6 -5
  138. package/third_party/boringssl/src/crypto/x509/x_info.c +31 -28
  139. package/third_party/boringssl/src/crypto/x509/x_name.c +361 -365
  140. package/third_party/boringssl/src/crypto/x509/x_pkey.c +38 -32
  141. package/third_party/boringssl/src/crypto/x509/x_pubkey.c +114 -117
  142. package/third_party/boringssl/src/crypto/x509/x_req.c +27 -29
  143. package/third_party/boringssl/src/crypto/x509/x_sig.c +2 -2
  144. package/third_party/boringssl/src/crypto/x509/x_spki.c +8 -10
  145. package/third_party/boringssl/src/crypto/x509/x_val.c +2 -2
  146. package/third_party/boringssl/src/crypto/x509/x_x509.c +212 -226
  147. package/third_party/boringssl/src/crypto/x509/x_x509a.c +112 -109
  148. package/third_party/boringssl/src/crypto/x509v3/ext_dat.h +10 -13
  149. package/third_party/boringssl/src/crypto/x509v3/internal.h +72 -87
  150. package/third_party/boringssl/src/crypto/x509v3/pcy_cache.c +184 -176
  151. package/third_party/boringssl/src/crypto/x509v3/pcy_data.c +58 -56
  152. package/third_party/boringssl/src/crypto/x509v3/pcy_lib.c +71 -70
  153. package/third_party/boringssl/src/crypto/x509v3/pcy_map.c +56 -58
  154. package/third_party/boringssl/src/crypto/x509v3/pcy_node.c +89 -91
  155. package/third_party/boringssl/src/crypto/x509v3/pcy_tree.c +585 -590
  156. package/third_party/boringssl/src/crypto/x509v3/v3_akey.c +118 -112
  157. package/third_party/boringssl/src/crypto/x509v3/v3_akeya.c +3 -3
  158. package/third_party/boringssl/src/crypto/x509v3/v3_alt.c +447 -451
  159. package/third_party/boringssl/src/crypto/x509v3/v3_bcons.c +44 -38
  160. package/third_party/boringssl/src/crypto/x509v3/v3_bitst.c +39 -43
  161. package/third_party/boringssl/src/crypto/x509v3/v3_conf.c +321 -320
  162. package/third_party/boringssl/src/crypto/x509v3/v3_cpols.c +352 -327
  163. package/third_party/boringssl/src/crypto/x509v3/v3_crld.c +437 -383
  164. package/third_party/boringssl/src/crypto/x509v3/v3_enum.c +23 -16
  165. package/third_party/boringssl/src/crypto/x509v3/v3_extku.c +62 -53
  166. package/third_party/boringssl/src/crypto/x509v3/v3_genn.c +118 -115
  167. package/third_party/boringssl/src/crypto/x509v3/v3_ia5.c +30 -31
  168. package/third_party/boringssl/src/crypto/x509v3/v3_info.c +112 -98
  169. package/third_party/boringssl/src/crypto/x509v3/v3_int.c +40 -15
  170. package/third_party/boringssl/src/crypto/x509v3/v3_lib.c +248 -252
  171. package/third_party/boringssl/src/crypto/x509v3/v3_ncons.c +390 -386
  172. package/third_party/boringssl/src/crypto/x509v3/v3_ocsp.c +45 -32
  173. package/third_party/boringssl/src/crypto/x509v3/v3_pci.c +206 -209
  174. package/third_party/boringssl/src/crypto/x509v3/v3_pcia.c +6 -8
  175. package/third_party/boringssl/src/crypto/x509v3/v3_pcons.c +54 -50
  176. package/third_party/boringssl/src/crypto/x509v3/v3_pmaps.c +66 -65
  177. package/third_party/boringssl/src/crypto/x509v3/v3_prn.c +144 -133
  178. package/third_party/boringssl/src/crypto/x509v3/v3_purp.c +695 -709
  179. package/third_party/boringssl/src/crypto/x509v3/v3_skey.c +75 -69
  180. package/third_party/boringssl/src/crypto/x509v3/v3_utl.c +1102 -1082
  181. package/third_party/boringssl/src/include/openssl/base.h +3 -1
  182. package/third_party/boringssl/src/include/openssl/bn.h +3 -0
  183. package/third_party/boringssl/src/include/openssl/bytestring.h +20 -0
  184. package/third_party/boringssl/src/include/openssl/evp.h +6 -5
  185. package/third_party/boringssl/src/include/openssl/kdf.h +91 -0
  186. package/third_party/boringssl/src/include/openssl/nid.h +4 -0
  187. package/third_party/boringssl/src/include/openssl/ssl.h +6 -1
  188. package/third_party/boringssl/src/include/openssl/stack.h +47 -32
  189. package/third_party/boringssl/src/include/openssl/trust_token.h +18 -3
  190. package/third_party/boringssl/src/include/openssl/x509.h +18 -0
  191. package/third_party/boringssl/src/ssl/ssl_file.cc +61 -99
  192. package/third_party/boringssl/src/ssl/ssl_test.cc +101 -0
  193. package/third_party/boringssl/src/util/doc.config +2 -1
  194. package/third_party/boringssl/src/util/fipstools/acvp/acvptool/subprocess/subprocess.go +8 -0
  195. package/third_party/googleurl/AUTHORS +16 -2
  196. package/third_party/googleurl/base/BUILD +1 -0
  197. package/third_party/googleurl/base/compiler_specific.h +16 -17
  198. package/third_party/googleurl/base/containers/contiguous_iterator.h +13 -9
  199. package/third_party/googleurl/base/containers/span.h +23 -8
  200. package/third_party/googleurl/base/memory/raw_ptr.h +17 -25
  201. package/third_party/googleurl/base/memory/raw_ptr_exclusion.h +21 -0
  202. package/third_party/googleurl/base/strings/escape.cc +14 -2
  203. package/third_party/googleurl/base/strings/safe_sprintf.h +1 -1
  204. package/third_party/googleurl/base/strings/string_number_conversions.cc +5 -3
  205. package/third_party/googleurl/base/strings/string_number_conversions_internal.h +5 -5
  206. package/third_party/googleurl/base/strings/string_piece.h +3 -3
  207. package/third_party/googleurl/base/strings/string_util.cc +4 -27
  208. package/third_party/googleurl/base/strings/string_util.h +43 -8
  209. package/third_party/googleurl/base/strings/string_util_internal.h +11 -12
  210. package/third_party/googleurl/base/strings/string_util_unittest.cc +33 -0
  211. package/third_party/googleurl/base/strings/string_util_win.cc +0 -5
  212. package/third_party/googleurl/base/strings/string_util_win.h +9 -1
  213. package/third_party/googleurl/base/strings/utf_offset_string_conversions.cc +1 -1
  214. package/third_party/googleurl/base/strings/utf_string_conversion_utils.cc +5 -8
  215. package/third_party/googleurl/base/strings/utf_string_conversion_utils.h +13 -10
  216. package/third_party/googleurl/base/strings/utf_string_conversions.cc +32 -25
  217. package/third_party/googleurl/base/template_util.h +23 -35
  218. package/third_party/googleurl/build/build_config.h +14 -3
  219. package/third_party/googleurl/copy.bara.sky +1 -1
  220. package/third_party/googleurl/url/gurl.cc +8 -4
  221. package/third_party/googleurl/url/gurl.h +1 -0
  222. package/third_party/googleurl/url/gurl_unittest.cc +1 -0
  223. package/third_party/googleurl/url/origin.h +36 -26
  224. package/third_party/googleurl/url/scheme_host_port.h +4 -1
  225. package/third_party/googleurl/url/url_canon.h +2 -1
  226. package/third_party/googleurl/url/url_canon_internal.cc +9 -7
  227. package/third_party/googleurl/url/url_canon_internal.h +16 -16
  228. package/third_party/googleurl/url/url_canon_stdstring.h +2 -1
  229. package/third_party/googleurl/url/url_util.cc +9 -8
  230. package/third_party/quiche/build/source_list.bzl +7 -0
  231. package/third_party/quiche/build/source_list.gni +7 -0
  232. package/third_party/quiche/build/source_list.json +7 -0
  233. package/third_party/quiche/quiche/common/platform/api/quiche_mem_slice.h +7 -3
  234. package/third_party/quiche/quiche/http2/adapter/nghttp2_adapter_test.cc +86 -2
  235. package/third_party/quiche/quiche/http2/adapter/oghttp2_adapter_test.cc +104 -2
  236. package/third_party/quiche/quiche/http2/adapter/oghttp2_session.cc +23 -0
  237. package/third_party/quiche/quiche/http2/adapter/oghttp2_session.h +6 -1
  238. package/third_party/quiche/quiche/quic/core/congestion_control/send_algorithm_test.cc +0 -16
  239. package/third_party/quiche/quiche/quic/core/crypto/crypto_protocol.h +1 -1
  240. package/third_party/quiche/quiche/quic/core/http/end_to_end_test.cc +56 -2
  241. package/third_party/quiche/quiche/quic/core/http/http_constants.cc +1 -0
  242. package/third_party/quiche/quiche/quic/core/http/http_constants.h +1 -0
  243. package/third_party/quiche/quiche/quic/core/http/http_encoder.cc +28 -17
  244. package/third_party/quiche/quiche/quic/core/http/http_encoder.h +5 -0
  245. package/third_party/quiche/quiche/quic/core/http/http_encoder_test.cc +26 -30
  246. package/third_party/quiche/quiche/quic/core/http/http_frames.h +1 -0
  247. package/third_party/quiche/quiche/quic/core/http/quic_server_session_base.cc +4 -4
  248. package/third_party/quiche/quiche/quic/core/http/quic_server_session_base_test.cc +1 -1
  249. package/third_party/quiche/quiche/quic/core/http/quic_spdy_client_session.cc +5 -1
  250. package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.cc +6 -33
  251. package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.h +0 -17
  252. package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream_test.cc +5 -20
  253. package/third_party/quiche/quiche/quic/core/io/quic_event_loop.h +81 -0
  254. package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop.cc +265 -0
  255. package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop.h +152 -0
  256. package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop_test.cc +341 -0
  257. package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store.cc +3 -1
  258. package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store.h +7 -7
  259. package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store_test.cc +4 -3
  260. package/third_party/quiche/quiche/quic/core/quic_connection.cc +69 -19
  261. package/third_party/quiche/quiche/quic/core/quic_connection.h +9 -3
  262. package/third_party/quiche/quiche/quic/core/quic_connection_id_manager.cc +29 -10
  263. package/third_party/quiche/quiche/quic/core/quic_connection_id_manager.h +5 -3
  264. package/third_party/quiche/quiche/quic/core/quic_connection_id_manager_test.cc +85 -22
  265. package/third_party/quiche/quiche/quic/core/quic_connection_test.cc +186 -30
  266. package/third_party/quiche/quiche/quic/core/quic_crypto_stream.cc +2 -1
  267. package/third_party/quiche/quiche/quic/core/quic_default_clock.cc +31 -0
  268. package/third_party/quiche/quiche/quic/core/quic_default_clock.h +34 -0
  269. package/third_party/quiche/quiche/quic/core/quic_default_connection_helper.h +49 -0
  270. package/third_party/quiche/quiche/quic/core/quic_dispatcher.cc +53 -37
  271. package/third_party/quiche/quiche/quic/core/quic_dispatcher.h +19 -11
  272. package/third_party/quiche/quiche/quic/core/quic_dispatcher_test.cc +15 -2
  273. package/third_party/quiche/quiche/quic/core/quic_flags_list.h +10 -4
  274. package/third_party/quiche/quiche/quic/core/quic_idle_network_detector.cc +2 -2
  275. package/third_party/quiche/quiche/quic/core/quic_idle_network_detector_test.cc +4 -4
  276. package/third_party/quiche/quiche/quic/core/quic_packet_creator.cc +14 -3
  277. package/third_party/quiche/quiche/quic/core/quic_packet_creator_test.cc +145 -2
  278. package/third_party/quiche/quiche/quic/core/quic_packets.cc +3 -1
  279. package/third_party/quiche/quiche/quic/core/quic_packets.h +4 -0
  280. package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager.cc +13 -11
  281. package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager.h +9 -0
  282. package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager_test.cc +6 -0
  283. package/third_party/quiche/quiche/quic/core/quic_session.cc +3 -2
  284. package/third_party/quiche/quiche/quic/core/quic_session.h +8 -3
  285. package/third_party/quiche/quiche/quic/core/quic_types.cc +18 -0
  286. package/third_party/quiche/quiche/quic/core/quic_types.h +3 -0
  287. package/third_party/quiche/quiche/quic/core/tls_chlo_extractor.cc +3 -0
  288. package/third_party/quiche/quiche/quic/core/tls_chlo_extractor.h +10 -0
  289. package/third_party/quiche/quiche/quic/test_tools/mock_quic_session_visitor.h +1 -1
  290. package/third_party/quiche/quiche/quic/test_tools/quic_test_utils.h +1 -1
  291. package/third_party/quiche/quiche/quic/test_tools/server_thread.cc +3 -2
  292. package/third_party/quiche/quiche/quic/test_tools/simple_session_notifier.cc +7 -1
  293. package/third_party/quiche/quiche/quic/test_tools/simple_session_notifier.h +3 -0
  294. package/third_party/quiche/quiche/quic/test_tools/simulator/quic_endpoint.h +4 -2
  295. package/certs/ca.cnf +0 -69
  296. package/certs/generate_certs.sh +0 -53
  297. package/certs/generate_certs_leaf.sh +0 -53
  298. package/certs/leaf.cnf +0 -24
  299. package/certs/readme.txt +0 -2
  300. 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
- ChloAlpnSniExtractor alpn_extractor;
591
- if (ChloExtractor::Extract(packet_info.packet, packet_info.version,
592
- config_->create_session_tag_indicators(),
593
- &alpn_extractor,
594
- server_connection_id.length())) {
595
- if (MaybeHandleLegacyVersionEncapsulation(
596
- this,
597
- alpn_extractor.ConsumeLegacyVersionEncapsulationInnerPacket(),
598
- packet_info)) {
599
- return true;
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
- absl::optional<ParsedClientHello> parsed_chlo =
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 (MaybeHandleLegacyVersionEncapsulation(
729
- this, parsed_chlo->legacy_version_encapsulation_inner_packet,
730
- *packet_info)) {
731
- return;
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
- absl::optional<ParsedClientHello>
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 absl::nullopt;
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 parsed_chlo;
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 absl::nullopt;
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 absl::nullopt;
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 parsed_chlo;
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
- if (ShouldDestroySessionAsynchronously()) {
1055
- // Set up alarm to fire immediately to bring destruction of this session
1056
- // out of current call stack.
1057
- if (closed_session_list_.empty()) {
1058
- delete_sessions_alarm_->Update(helper()->GetClock()->ApproximateNow(),
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
- void QuicDispatcher::OnNewConnectionIdSent(
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
- QUICHE_DCHECK(insertion_result.second);
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
- // Add the newly issued connection ID to the session map.
106
- void OnNewConnectionIdSent(
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
- // Return the parsed client hello if the full Client Hello has been
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 return absl::nullopt and either buffer or (rarely) drop the
380
- // packet.
381
- absl::optional<ParsedClientHello> TryExtractChloOrBufferEarlyPacket(
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_->OnNewConnectionIdSent(active_connection_ids_.back(), id);
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
- OnNewConnectionIdSent) {
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, false)
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(quic_restart_flag_quic_enable_sending_bandwidth_estimate_when_network_idle, true)
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
- quic_enable_sending_bandwidth_estimate_when_network_idle) &&
77
+ quic_enable_sending_bandwidth_estimate_when_network_idle_v2) &&
78
78
  handshake_timeout_.IsInfinite()) {
79
79
  QUIC_RESTART_FLAG_COUNT_N(
80
- quic_enable_sending_bandwidth_estimate_when_network_idle, 1, 3);
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
- quic_enable_sending_bandwidth_estimate_when_network_idle)) {
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
- quic_enable_sending_bandwidth_estimate_when_network_idle);
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
- quic_enable_sending_bandwidth_estimate_when_network_idle)) {
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
- quic_enable_sending_bandwidth_estimate_when_network_idle)) {
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
- // Packet transmission type is determined by the last added retransmittable
1799
- // frame.
1800
- if (QuicUtils::IsRetransmittableFrame(frame.type)) {
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;