Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Fredy Wijaya <[email protected]>
  • Loading branch information
fredyw committed Sep 30, 2024
1 parent 1832eb5 commit 4ef2224
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 37 deletions.
49 changes: 20 additions & 29 deletions bazel/external/quiche.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ envoy_cc_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_adapter_data_source",
":http2_adapter_http2_protocol",
":http2_adapter_http2_visitor_interface",
":http2_adapter_nghttp2_include",
":quiche_common_platform_export",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -435,6 +435,7 @@ envoy_cc_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_adapter_chunked_buffer",
":http2_adapter_data_source",
":http2_adapter_event_forwarder",
Expand All @@ -453,7 +454,6 @@ envoy_cc_library(
":http2_header_byte_listener_interface_lib",
":http2_no_op_headers_handler_lib",
":quiche_common_callbacks",
":spdy_core_http2_header_block_lib",
"@com_google_absl//absl/algorithm",
"@com_google_absl//absl/cleanup",
],
Expand Down Expand Up @@ -498,9 +498,9 @@ envoy_cc_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_adapter_http2_protocol",
":quiche_common_platform_export",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -570,6 +570,7 @@ envoy_cc_test_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_adapter_chunked_buffer",
":http2_adapter_data_source",
":http2_adapter_http2_protocol",
Expand All @@ -578,7 +579,6 @@ envoy_cc_test_library(
":http2_core_protocol_lib",
":http2_hpack_hpack_lib",
":quiche_common_platform_test",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -1320,7 +1320,6 @@ envoy_cc_library(
srcs = ["quiche/http2/core/spdy_alt_svc_wire_format.cc"],
hdrs = [
"quiche/http2/core/spdy_alt_svc_wire_format.h",
"quiche/spdy/core/spdy_alt_svc_wire_format.h",
],
copts = quiche_copts,
repository = "@envoy",
Expand All @@ -1337,25 +1336,23 @@ envoy_cc_library(
hdrs = [
"quiche/http2/core/spdy_frame_builder.h",
"quiche/http2/core/spdy_framer.h",
"quiche/spdy/core/spdy_frame_builder.h",
"quiche/spdy/core/spdy_framer.h",
],
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_core_alt_svc_wire_format_lib",
":http2_core_headers_handler_interface_lib",
":http2_core_protocol_lib",
":http2_core_zero_copy_output_buffer_lib",
":http2_hpack_hpack_lib",
":quiche_common_platform",
":spdy_core_http2_header_block_lib",
],
)

envoy_cc_library(
name = "spdy_core_http2_header_block_lib",
hdrs = ["quiche/spdy/core/http2_header_block.h"],
name = "common_http_http_header_block_lib",
hdrs = ["quiche/common/http/http_header_block.h"],
copts = quiche_copts,
repository = "@envoy",
visibility = ["//visibility:public"],
Expand All @@ -1381,13 +1378,11 @@ envoy_cc_library(
envoy_cc_library(
name = "http2_core_http2_deframer_lib",
srcs = ["quiche/http2/core/http2_frame_decoder_adapter.cc"],
hdrs = [
"quiche/http2/core/http2_frame_decoder_adapter.h",
"quiche/spdy/core/http2_frame_decoder_adapter.h",
],
hdrs = ["quiche/http2/core/http2_frame_decoder_adapter.h"],
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_constants_lib",
":http2_core_alt_svc_wire_format_lib",
":http2_core_headers_handler_interface_lib",
Expand All @@ -1396,11 +1391,10 @@ envoy_cc_library(
":http2_decoder_decode_status_lib",
":http2_decoder_frame_decoder_lib",
":http2_decoder_frame_decoder_listener_lib",
":http2_hpack_hpack_decoder_adapter_lib",
":http2_hpack_hpack_lib",
":http2_structures_lib",
":quiche_common_platform",
":spdy_core_hpack_hpack_decoder_adapter_lib",
":spdy_core_http2_header_block_lib",
],
)

Expand All @@ -1427,7 +1421,6 @@ envoy_cc_library(
"quiche/http2/hpack/hpack_header_table.h",
"quiche/http2/hpack/hpack_output_stream.h",
"quiche/http2/hpack/hpack_static_table.h",
"quiche/spdy/core/hpack/hpack_encoder.h",
],
copts = quiche_copts,
repository = "@envoy",
Expand All @@ -1442,12 +1435,13 @@ envoy_cc_library(
)

envoy_cc_library(
name = "spdy_core_hpack_hpack_decoder_adapter_lib",
srcs = ["quiche/spdy/core/hpack/hpack_decoder_adapter.cc"],
hdrs = ["quiche/spdy/core/hpack/hpack_decoder_adapter.h"],
name = "http2_hpack_hpack_decoder_adapter_lib",
srcs = ["quiche/http2/hpack/hpack_decoder_adapter.cc"],
hdrs = ["quiche/http2/hpack/hpack_decoder_adapter.h"],
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_core_headers_handler_interface_lib",
":http2_decoder_decode_buffer_lib",
":http2_decoder_decode_status_lib",
Expand All @@ -1458,7 +1452,6 @@ envoy_cc_library(
":http2_hpack_hpack_lib",
":http2_no_op_headers_handler_lib",
":quiche_common_platform",
":spdy_core_http2_header_block_lib",
],
)

Expand All @@ -1482,16 +1475,14 @@ envoy_cc_library(
hdrs = [
"quiche/http2/core/spdy_bitmasks.h",
"quiche/http2/core/spdy_protocol.h",
"quiche/spdy/core/spdy_bitmasks.h",
"quiche/spdy/core/spdy_protocol.h",
],
copts = quiche_copts,
repository = "@envoy",
visibility = ["//visibility:public"],
deps = [
":common_http_http_header_block_lib",
":http2_core_alt_svc_wire_format_lib",
":quiche_common_platform",
":spdy_core_http2_header_block_lib",
],
)

Expand All @@ -1501,8 +1492,8 @@ envoy_cc_library(
hdrs = ["quiche/http2/core/recording_headers_handler.h"],
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_core_headers_handler_interface_lib",
":spdy_core_http2_header_block_lib",
],
)

Expand All @@ -1513,11 +1504,11 @@ envoy_cc_test_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_core_headers_handler_interface_lib",
":http2_core_protocol_lib",
":quiche_common_platform",
":quiche_common_test_tools_test_utils_lib",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -3088,13 +3079,13 @@ envoy_quic_cc_library(
srcs = ["quiche/quic/core/http/quic_header_list.cc"],
hdrs = ["quiche/quic/core/http/quic_header_list.h"],
deps = [
":common_http_http_header_block_lib",
":http2_core_headers_handler_interface_lib",
":http2_core_protocol_lib",
":quic_core_packets_lib",
":quic_core_qpack_qpack_header_table_lib",
":quic_platform_base",
":quiche_common_circular_deque_lib",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -3830,8 +3821,8 @@ envoy_quic_cc_library(
srcs = ["quiche/quic/core/qpack/value_splitting_header_list.cc"],
hdrs = ["quiche/quic/core/qpack/value_splitting_header_list.h"],
deps = [
":common_http_http_header_block_lib",
":quic_platform_base",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -5600,10 +5591,10 @@ envoy_cc_library(
repository = "@envoy",
tags = ["nofips"],
deps = [
":common_http_http_header_block_lib",
":quiche_common_callbacks",
":quiche_common_platform_export",
":quiche_common_quiche_stream_lib",
":spdy_core_http2_header_block_lib",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
Expand Down
2 changes: 1 addition & 1 deletion source/common/http/http3/conn_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Http3ConnPoolImpl::Http3ConnPoolImpl(
random_generator, state, client_fn, codec_fn, protocol, {}, nullptr),
quic_info_(dynamic_cast<Quic::PersistentQuicInfoImpl&>(quic_info)),
server_id_(sni(transport_socket_options, host),
static_cast<uint16_t>(host_->address()->ip()->port()), false),
static_cast<uint16_t>(host_->address()->ip()->port())),
connect_callback_(connect_callback), attempt_happy_eyeballs_(attempt_happy_eyeballs),
network_observer_registry_(network_observer_registry) {}

Expand Down
8 changes: 4 additions & 4 deletions test/common/quic/client_connection_factory_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ TEST_P(QuicNetworkConnectionTest, BufferLimits) {
initialize();
std::unique_ptr<Network::ClientConnection> client_connection = createQuicNetworkConnection(
*quic_info_, crypto_config_,
quic::QuicServerId{factory_->clientContextConfig()->serverNameIndication(), PEER_PORT, false},
quic::QuicServerId{factory_->clientContextConfig()->serverNameIndication(), PEER_PORT},
dispatcher_, test_address_, test_address_, quic_stat_names_, {}, *store_.rootScope(), nullptr,
nullptr, connection_id_generator_, *factory_);
EnvoyQuicClientSession* session = static_cast<EnvoyQuicClientSession*>(client_connection.get());
Expand All @@ -125,7 +125,7 @@ TEST_P(QuicNetworkConnectionTest, SocketOptions) {

std::unique_ptr<Network::ClientConnection> client_connection = createQuicNetworkConnection(
*quic_info_, crypto_config_,
quic::QuicServerId{factory_->clientContextConfig()->serverNameIndication(), PEER_PORT, false},
quic::QuicServerId{factory_->clientContextConfig()->serverNameIndication(), PEER_PORT},
dispatcher_, test_address_, test_address_, quic_stat_names_, {}, *store_.rootScope(),
socket_options, nullptr, connection_id_generator_, *factory_);
EnvoyQuicClientSession* session = static_cast<EnvoyQuicClientSession*>(client_connection.get());
Expand All @@ -142,7 +142,7 @@ TEST_P(QuicNetworkConnectionTest, LocalAddress) {
: Network::Utility::getCanonicalIpv4LoopbackAddress();
std::unique_ptr<Network::ClientConnection> client_connection = createQuicNetworkConnection(
*quic_info_, crypto_config_,
quic::QuicServerId{factory_->clientContextConfig()->serverNameIndication(), PEER_PORT, false},
quic::QuicServerId{factory_->clientContextConfig()->serverNameIndication(), PEER_PORT},
dispatcher_, test_address_, local_addr, quic_stat_names_, {}, *store_.rootScope(), nullptr,
nullptr, connection_id_generator_, *factory_);
EnvoyQuicClientSession* session = static_cast<EnvoyQuicClientSession*>(client_connection.get());
Expand All @@ -164,7 +164,7 @@ TEST_P(QuicNetworkConnectionTest, Srtt) {

std::unique_ptr<Network::ClientConnection> client_connection = createQuicNetworkConnection(
info, crypto_config_,
quic::QuicServerId{factory_->clientContextConfig()->serverNameIndication(), PEER_PORT, false},
quic::QuicServerId{factory_->clientContextConfig()->serverNameIndication(), PEER_PORT},
dispatcher_, test_address_, test_address_, quic_stat_names_, rtt_cache, *store_.rootScope(),
nullptr, nullptr, connection_id_generator_, *factory_);

Expand Down
2 changes: 1 addition & 1 deletion test/common/quic/envoy_quic_client_session_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class EnvoyQuicClientSessionTest : public testing::TestWithParam<quic::ParsedQui
envoy_quic_session_ = std::make_unique<EnvoyQuicClientSession>(
quic_config_, quic_version_,
std::unique_ptr<TestEnvoyQuicClientConnection>(quic_connection_),
quic::QuicServerId("example.com", 443, false), crypto_config_, *dispatcher_,
quic::QuicServerId("example.com", 443), crypto_config_, *dispatcher_,
/*send_buffer_limit*/ 1024 * 1024, crypto_stream_factory_, quic_stat_names_, cache,
*store_.rootScope(), transport_socket_options_, uts_factory);

Expand Down
2 changes: 1 addition & 1 deletion test/common/quic/test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class MockEnvoyQuicClientSession : public IsolatedStoreProvider, public EnvoyQui
Event::Dispatcher& dispatcher, uint32_t send_buffer_limit,
EnvoyQuicCryptoClientStreamFactoryInterface& crypto_stream_factory)
: EnvoyQuicClientSession(config, supported_versions, std::move(connection),
quic::QuicServerId("example.com", 443, false),
quic::QuicServerId("example.com", 443),
std::make_shared<quic::QuicCryptoClientConfig>(
quic::test::crypto_test_utils::ProofVerifierForTesting()),
dispatcher, send_buffer_limit, crypto_stream_factory,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/quic_http_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class QuicHttpIntegrationTestBase : public HttpIntegrationTest {
quic::QuicServerId{
(host.empty() ? transport_socket_factory_->clientContextConfig()->serverNameIndication()
: host),
static_cast<uint16_t>(port), false},
static_cast<uint16_t>(port)},
transport_socket_factory_->getCryptoConfig(), *dispatcher_,
// Use smaller window than the default one to have test coverage of client codec buffer
// exceeding high watermark.
Expand Down

0 comments on commit 4ef2224

Please sign in to comment.