Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quiche: use max header size configured in HCM #15912

Merged
merged 66 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
bb02ae6
enable protocol integration test
danzh1989 Mar 9, 2021
09fc660
visibility
danzh1989 Mar 9, 2021
6ed3c94
make protocol test pass
danzh1989 Mar 10, 2021
186a69d
add more test
danzh1989 Mar 11, 2021
66dbde0
quic_pause_filter
danzh1989 Mar 11, 2021
d5cbd00
address comments
danzh1989 Mar 13, 2021
cf08311
fix const reference
danzh1989 Mar 15, 2021
97a3033
Merge branch 'master' into addprotointegrationtest
danzh1989 Mar 15, 2021
e00fd2b
Merge branch 'master' into addprotointegrationtest
danzh1989 Mar 16, 2021
5682791
fix in filters
danzh1989 Mar 16, 2021
96c587e
Merge branch 'master' into addprotointegrationtest
danzh1989 Mar 16, 2021
725d93e
stop using udp_listener_name
danzh1989 Mar 16, 2021
354a322
fix IPv6 test failure
danzh1989 Mar 17, 2021
2b94626
fix setSan
danzh1989 Mar 17, 2021
77cb937
fix asan and gcc
danzh1989 Mar 17, 2021
4e9e56a
test size to large
danzh1989 Mar 17, 2021
88398b8
test size to large
danzh1989 Mar 18, 2021
5c11723
move config setup to config helper
danzh1989 Mar 18, 2021
39e3f9a
Merge branch 'master' into addprotointegrationtest
danzh1989 Mar 18, 2021
4c2b490
fix setSan
danzh1989 Mar 19, 2021
97292b2
change send single request
danzh1989 Mar 22, 2021
fdc6189
Merge branch 'master' into addprotointegrationtest
danzh1989 Mar 22, 2021
280fc25
address comments
danzh1989 Mar 22, 2021
3c02978
fix comment
danzh1989 Mar 22, 2021
c31225b
comment about \0
danzh1989 Mar 23, 2021
e1fd5d7
Merge branch 'master' into addprotointegrationtest
danzh1989 Mar 23, 2021
2dd1ae5
fix typo
danzh1989 Mar 23, 2021
60015bf
plumb header size and underscore action
danzh1989 Mar 24, 2021
55da362
Merge branch 'master' into headersize
danzh1989 Mar 24, 2021
71eb14c
fail at QUICHE_CHECK
danzh1989 Mar 24, 2021
4c45c9f
fix filter initialize order
danzh1989 Mar 25, 2021
8da2e26
Merge branch 'master' into headersize
danzh1989 Apr 8, 2021
852a392
protocol test fail
danzh1989 Apr 9, 2021
ec6a58c
test pass
danzh1989 Apr 9, 2021
cf32e9d
close connection during filter initialization
danzh1989 Apr 10, 2021
dd14732
enable upstream test
danzh1989 Apr 10, 2021
8730535
fix format
danzh1989 Apr 11, 2021
f423074
format
danzh1989 Apr 11, 2021
87cd212
use absl::string_view
danzh1989 Apr 12, 2021
6c48a12
fix ClientCodec test
danzh1989 Apr 12, 2021
59322e6
fix asan
danzh1989 Apr 13, 2021
669ef78
remove unused include
danzh1989 Apr 13, 2021
0396a8f
fix clang-tidy
danzh1989 Apr 13, 2021
fecd6ba
split QuicFilterManagerConnection interface
danzh1989 Apr 15, 2021
75e85ce
add client codec connect()
danzh1989 Apr 16, 2021
dbac8ea
Merge branch 'master' into headersize
danzh1989 Apr 16, 2021
1b9a3b2
fix clang-tidy
danzh1989 Apr 16, 2021
836a6e8
reverted misfired replacement
danzh1989 Apr 16, 2021
a8297cb
address comments
danzh1989 Apr 19, 2021
885a7b9
address comments
danzh1989 Apr 23, 2021
7953bc8
Merge branch 'master' into headersize
danzh1989 Apr 23, 2021
95561c4
quic_header_size_limit_includes_overhead default to false
danzh1989 Apr 24, 2021
6eefb38
initialize flag registry
danzh1989 Apr 24, 2021
96aad88
register flags for client side
danzh1989 Apr 24, 2021
f929456
Merge branch 'master' into headersize
danzh1989 Apr 24, 2021
6c38879
NOLINT(namespace-envoy)
danzh1989 Apr 25, 2021
7b29d70
typo
danzh1989 Apr 26, 2021
b6e3ace
connected_called_ NDEBUG
danzh1989 Apr 26, 2021
09aca06
Merge branch 'master' into headersize
danzh1989 Apr 26, 2021
5d77b16
remove DDEBUG
danzh1989 Apr 26, 2021
5d4469a
Merge branch 'master' into headersize
danzh1989 Apr 26, 2021
42c08af
Merge branch 'master' into headersize
danzh1989 Apr 27, 2021
1677acc
remove quic_includes_ignores
danzh1989 Apr 27, 2021
0651906
delay close
danzh1989 Apr 28, 2021
55fd7b3
disable ManyLargeRequestHeadersAccepted
danzh1989 Apr 28, 2021
874a4b0
spell dict
danzh1989 Apr 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 27 additions & 14 deletions source/common/http/codec_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ CodecClient::CodecClient(Type type, Network::ClientConnectionPtr&& connection,
connection_->addConnectionCallbacks(*this);
connection_->addReadFilter(Network::ReadFilterSharedPtr{new CodecReadFilter(*this)});

// In general, codecs are handed new not-yet-connected connections, but in the
// case of ALPN, the codec may be handed an already connected connection.
if (!connection_->connecting()) {
ASSERT(connection_->state() == Network::Connection::State::Open);
connected_ = true;
} else {
ENVOY_CONN_LOG(debug, "connecting", *connection_);
connection_->connect();
}

if (idle_timeout_) {
idle_timer_ = dispatcher.createTimer([this]() -> void { onIdleTimeout(); });
enableIdleTimer();
Expand All @@ -54,7 +44,27 @@ CodecClient::CodecClient(Type type, Network::ClientConnectionPtr&& connection,
connection_->noDelay(true);
}

CodecClient::~CodecClient() = default;
CodecClient::~CodecClient() {
#ifndef NDEBUG
ASSERT(connect_called_, "CodecClient::connect() is not called through out the life time.");
alyssawilk marked this conversation as resolved.
Show resolved Hide resolved
#endif
}

void CodecClient::connect() {
alyssawilk marked this conversation as resolved.
Show resolved Hide resolved
#ifndef NDEBUG
connect_called_ = true;
#endif
ASSERT(codec_ != nullptr);
// In general, codecs are handed new not-yet-connected connections, but in the
// case of ALPN, the codec may be handed an already connected connection.
if (!connection_->connecting()) {
ASSERT(connection_->state() == Network::Connection::State::Open);
connected_ = true;
} else {
ENVOY_CONN_LOG(debug, "connecting", *connection_);
connection_->connect();
}
}
alyssawilk marked this conversation as resolved.
Show resolved Hide resolved

void CodecClient::close() { connection_->close(Network::ConnectionCloseType::NoFlush); }

Expand Down Expand Up @@ -168,7 +178,6 @@ CodecClientProd::CodecClientProd(Type type, Network::ClientConnectionPtr&& conne
Event::Dispatcher& dispatcher,
Random::RandomGenerator& random_generator)
: CodecClient(type, std::move(connection), host, dispatcher) {

switch (type) {
case Type::HTTP1: {
codec_ = std::make_unique<Http1::ClientConnectionImpl>(
Expand All @@ -185,17 +194,21 @@ CodecClientProd::CodecClientProd(Type type, Network::ClientConnectionPtr&& conne
}
case Type::HTTP3: {
#ifdef ENVOY_ENABLE_QUIC
auto& quic_session = dynamic_cast<Quic::EnvoyQuicClientSession&>(*connection_);
codec_ = std::make_unique<Quic::QuicHttpClientConnectionImpl>(
dynamic_cast<Quic::EnvoyQuicClientSession&>(*connection_), *this,
host->cluster().http3CodecStats(), host->cluster().http3Options(),
quic_session, *this, host->cluster().http3CodecStats(), host->cluster().http3Options(),
Http::DEFAULT_MAX_REQUEST_HEADERS_KB);
// Initialize the session after max request header size is changed in above http client
// connection creation.
quic_session.Initialize();
Comment on lines +197 to +199
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call quic_session.Initialize in QuicHttpClientConnectionImpl's constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we could. But explicitly call Initialize() is more consistent with QUICHE code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, quic_session has already been created before this function is called, so the initialize is already far away from the constructor. Your call.

break;
#else
// Should be blocked by configuration checking at an earlier point.
NOT_REACHED_GCOVR_EXCL_LINE;
#endif
}
}
connect();
}

} // namespace Http
Expand Down
11 changes: 10 additions & 1 deletion source/common/http/codec_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CodecClientCallbacks {
* This is an HTTP client that multiple stream management and underlying connection management
* across multiple HTTP codec types.
*/
class CodecClient : Logger::Loggable<Logger::Id::client>,
class CodecClient : protected Logger::Loggable<Logger::Id::client>,
public Http::ConnectionCallbacks,
public Network::ConnectionCallbacks,
public Event::DeferredDeletable {
Expand Down Expand Up @@ -140,6 +140,12 @@ class CodecClient : Logger::Loggable<Logger::Id::client>,
CodecClient(Type type, Network::ClientConnectionPtr&& connection,
Upstream::HostDescriptionConstSharedPtr host, Event::Dispatcher& dispatcher);

/**
* Connect to the host.
* Needs to be called after codec_ is instantiated.
*/
void connect();

// Http::ConnectionCallbacks
void onGoAway(GoAwayErrorCode error_code) override {
if (codec_callbacks_) {
Expand Down Expand Up @@ -257,6 +263,9 @@ class CodecClient : Logger::Loggable<Logger::Id::client>,
bool connected_{};
bool remote_closed_{};
bool protocol_error_{false};
#ifndef NDEBUG
bool connect_called_{false};
#endif
};

using CodecClientPtr = std::unique_ptr<CodecClient>;
Expand Down
33 changes: 23 additions & 10 deletions source/common/quic/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ licenses(["notice"]) # Apache 2
# that are required to be selected into the build for http3 to work.
envoy_package()

envoy_cc_library(
name = "quic_includes_ignores_lib",
hdrs = ["quic_includes_ignores.h"],
)

envoy_cc_library(
name = "envoy_quic_alarm_lib",
srcs = ["envoy_quic_alarm.cc"],
Expand Down Expand Up @@ -180,8 +185,9 @@ envoy_cc_library(
hdrs = ["quic_filter_manager_connection_impl.h"],
tags = ["nofips"],
deps = [
":envoy_quic_connection_lib",
":envoy_quic_simulated_watermark_buffer_lib",
":quic_includes_ignores_lib",
":quic_network_connection_lib",
":send_buffer_monitor_lib",
"//include/envoy/event:dispatcher_interface",
"//include/envoy/network:connection_interface",
Expand All @@ -192,6 +198,7 @@ envoy_cc_library(
"//source/common/http/http3:codec_stats_lib",
"//source/common/network:connection_base_lib",
"//source/common/stream_info:stream_info_lib",
"@com_googlesource_quiche//:quic_core_connection_lib",
],
)

Expand All @@ -208,6 +215,7 @@ envoy_cc_library(
tags = ["nofips"],
deps = [
":envoy_quic_proof_source_lib",
":envoy_quic_server_connection_lib",
":envoy_quic_stream_lib",
":envoy_quic_utils_lib",
":quic_filter_manager_connection_lib",
Expand Down Expand Up @@ -255,17 +263,13 @@ envoy_cc_library(
)

envoy_cc_library(
name = "envoy_quic_connection_lib",
srcs = ["envoy_quic_connection.cc"],
hdrs = ["envoy_quic_connection.h"],
name = "quic_network_connection_lib",
srcs = ["quic_network_connection.cc"],
hdrs = ["quic_network_connection.h"],
tags = ["nofips"],
deps = [
":quic_io_handle_wrapper_lib",
"//include/envoy/network:connection_interface",
"//source/common/network:listen_socket_lib",
"//source/common/quic:envoy_quic_utils_lib",
"//source/extensions/transport_sockets:well_known_names",
"@com_googlesource_quiche//:quic_core_connection_lib",
],
)

Expand All @@ -275,8 +279,13 @@ envoy_cc_library(
hdrs = ["envoy_quic_server_connection.h"],
tags = ["nofips"],
deps = [
":envoy_quic_connection_lib",
":quic_includes_ignores_lib",
":quic_io_handle_wrapper_lib",
":quic_network_connection_lib",
"//source/common/quic:envoy_quic_utils_lib",
"//source/extensions/transport_sockets:well_known_names",
"//source/server:connection_handler_lib",
"@com_googlesource_quiche//:quic_core_connection_lib",
],
)

Expand All @@ -286,11 +295,13 @@ envoy_cc_library(
hdrs = ["envoy_quic_client_connection.h"],
tags = ["nofips"],
deps = [
":envoy_quic_connection_lib",
":envoy_quic_packet_writer_lib",
":quic_includes_ignores_lib",
":quic_network_connection_lib",
"//include/envoy/event:dispatcher_interface",
"//source/common/network:socket_option_factory_lib",
"//source/common/network:udp_packet_writer_handler_lib",
"@com_googlesource_quiche//:quic_core_connection_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
],
)
Expand Down Expand Up @@ -354,6 +365,8 @@ envoy_cc_library(
"//source/common/network:address_lib",
"//source/common/network:listen_socket_lib",
"//source/common/network:socket_option_factory_lib",
"//source/common/quic:quic_io_handle_wrapper_lib",
"//source/extensions/transport_sockets:well_known_names",
"@com_googlesource_quiche//:quic_core_http_header_list_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
],
Expand Down
3 changes: 3 additions & 0 deletions source/common/quic/active_quic_listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ ActiveQuicListener::ActiveQuicListener(
kernel_worker_routing_(kernel_worker_routing) {
// This flag fix a QUICHE issue which may crash Envoy during connection close.
SetQuicReloadableFlag(quic_single_ack_in_packet2, true);
// Do not include 32-byte per-entry overhead while counting header size.
quiche::FlagRegistry::getInstance();
ASSERT(!GetQuicFlag(FLAGS_quic_header_size_limit_includes_overhead));

if (Runtime::LoaderSingleton::getExisting()) {
enabled_.emplace(Runtime::FeatureFlag(enabled, Runtime::LoaderSingleton::get()));
Expand Down
5 changes: 3 additions & 2 deletions source/common/quic/client_connection_factory_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ PersistentQuicInfoImpl::PersistentQuicInfoImpl(
static_cast<uint16_t>(server_addr->ip()->port()), false},
crypto_config_(
std::make_unique<quic::QuicCryptoClientConfig>(std::make_unique<EnvoyQuicProofVerifier>(
stats_scope, getConfig(transport_socket_factory), time_source))) {}
stats_scope, getConfig(transport_socket_factory), time_source))) {
quiche::FlagRegistry::getInstance();
}

namespace {
// TODO(alyssawilk, danzh2010): This is mutable static info that is required for the QUICHE code.
Expand Down Expand Up @@ -53,7 +55,6 @@ createQuicNetworkConnection(Http::PersistentQuicInfo& info, Event::Dispatcher& d
static_info.quic_config_, info_impl->supported_versions_, std::move(connection),
info_impl->server_id_, info_impl->crypto_config_.get(), &static_info.push_promise_index_,
dispatcher, 0);
ret->Initialize();
return ret;
}

Expand Down
6 changes: 4 additions & 2 deletions source/common/quic/codec_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ QuicHttpServerConnectionImpl::QuicHttpServerConnectionImpl(
EnvoyQuicServerSession& quic_session, Http::ServerConnectionCallbacks& callbacks,
Http::Http3::CodecStats& stats,
const envoy::config::core::v3::Http3ProtocolOptions& http3_options,
const uint32_t /*max_request_headers_kb*/,
const uint32_t max_request_headers_kb,
envoy::config::core::v3::HttpProtocolOptions::HeadersWithUnderscoresAction
headers_with_underscores_action)
: QuicHttpConnectionImplBase(quic_session, stats), quic_server_session_(quic_session) {
quic_session.setCodecStats(stats);
quic_session.setHttp3Options(http3_options);
quic_session.setHeadersWithUnderscoreAction(headers_with_underscores_action);
quic_session.setHttpConnectionCallbacks(callbacks);
quic_session.set_max_inbound_header_list_size(max_request_headers_kb * 1024u);
}

void QuicHttpServerConnectionImpl::onUnderlyingConnectionAboveWriteBufferHighWatermark() {
Expand Down Expand Up @@ -68,11 +69,12 @@ QuicHttpClientConnectionImpl::QuicHttpClientConnectionImpl(
EnvoyQuicClientSession& session, Http::ConnectionCallbacks& callbacks,
Http::Http3::CodecStats& stats,
const envoy::config::core::v3::Http3ProtocolOptions& http3_options,
const uint32_t /*max_request_headers_kb*/)
const uint32_t max_request_headers_kb)
: QuicHttpConnectionImplBase(session, stats), quic_client_session_(session) {
session.setCodecStats(stats);
session.setHttp3Options(http3_options);
session.setHttpConnectionCallbacks(callbacks);
session.set_max_inbound_header_list_size(max_request_headers_kb * 1024);
}

Http::RequestEncoder&
Expand Down
12 changes: 6 additions & 6 deletions source/common/quic/envoy_quic_client_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ EnvoyQuicClientConnection::EnvoyQuicClientConnection(
quic::QuicAlarmFactory& alarm_factory, quic::QuicPacketWriter* writer, bool owns_writer,
const quic::ParsedQuicVersionVector& supported_versions, Event::Dispatcher& dispatcher,
Network::ConnectionSocketPtr&& connection_socket)
: EnvoyQuicConnection(server_connection_id, quic::QuicSocketAddress(),
envoyIpAddressToQuicSocketAddress(
connection_socket->addressProvider().remoteAddress()->ip()),
helper, alarm_factory, writer, owns_writer, quic::Perspective::IS_CLIENT,
supported_versions, std::move(connection_socket)),
dispatcher_(dispatcher) {}
: quic::QuicConnection(server_connection_id, quic::QuicSocketAddress(),
envoyIpAddressToQuicSocketAddress(
connection_socket->addressProvider().remoteAddress()->ip()),
&helper, &alarm_factory, writer, owns_writer,
quic::Perspective::IS_CLIENT, supported_versions),
QuicNetworkConnection(std::move(connection_socket)), dispatcher_(dispatcher) {}

void EnvoyQuicClientConnection::processPacket(
Network::Address::InstanceConstSharedPtr local_address,
Expand Down
10 changes: 8 additions & 2 deletions source/common/quic/envoy_quic_client_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
#include "envoy/event/dispatcher.h"

#include "common/network/utility.h"
#include "common/quic/envoy_quic_connection.h"
#include "common/quic/envoy_quic_utils.h"
#include "common/quic/quic_network_connection.h"

#define QUICHE_INCLUDE_1 "quiche/quic/core/quic_connection.h"
#include "common/quic/quic_includes_ignores.h"

namespace Envoy {
namespace Quic {

// A client QuicConnection instance managing its own file events.
class EnvoyQuicClientConnection : public EnvoyQuicConnection, public Network::UdpPacketProcessor {
class EnvoyQuicClientConnection : public quic::QuicConnection,
public QuicNetworkConnection,
public Network::UdpPacketProcessor {
public:
// A connection socket will be created with given |local_addr|. If binding
// port not provided in |local_addr|, pick up a random port.
Expand Down
23 changes: 15 additions & 8 deletions source/common/quic/envoy_quic_client_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ EnvoyQuicClientSession::EnvoyQuicClientSession(
quic::QuicCryptoClientConfig* crypto_config,
quic::QuicClientPushPromiseIndex* push_promise_index, Event::Dispatcher& dispatcher,
uint32_t send_buffer_limit)
: QuicFilterManagerConnectionImpl(*connection, dispatcher, send_buffer_limit),
: QuicFilterManagerConnectionImpl(*connection, connection->connection_id(), dispatcher,
send_buffer_limit),
quic::QuicSpdyClientSession(config, supported_versions, connection.release(), server_id,
crypto_config, push_promise_index),
host_name_(server_id.host()) {
// HTTP/3 header limits should be configurable, but for now hard-code to Envoy defaults.
set_max_inbound_header_list_size(Http::DEFAULT_MAX_REQUEST_HEADERS_KB * 1000);
}
host_name_(server_id.host()) {}

EnvoyQuicClientSession::~EnvoyQuicClientSession() {
ASSERT(!connection()->connected());
quic_connection_ = nullptr;
network_connection_ = nullptr;
}

absl::string_view EnvoyQuicClientSession::requestedServerName() const { return host_name_; }

void EnvoyQuicClientSession::connect() {
dynamic_cast<EnvoyQuicClientConnection*>(quic_connection_)->setUpConnectionSocket();
dynamic_cast<EnvoyQuicClientConnection*>(network_connection_)->setUpConnectionSocket();
// Start version negotiation and crypto handshake during which the connection may fail if server
// doesn't support the one and only supported version.
CryptoConnect();
Expand All @@ -41,7 +39,8 @@ void EnvoyQuicClientSession::OnConnectionClosed(const quic::QuicConnectionCloseF

void EnvoyQuicClientSession::Initialize() {
quic::QuicSpdyClientSession::Initialize();
quic_connection_->setEnvoyConnection(*this);
initialized_ = true;
network_connection_->setEnvoyConnection(*this);
}

void EnvoyQuicClientSession::OnCanWrite() {
Expand Down Expand Up @@ -102,6 +101,14 @@ EnvoyQuicClientSession::CreateIncomingStream(quic::PendingStream* /*pending*/) {

bool EnvoyQuicClientSession::hasDataToWrite() { return HasDataToWrite(); }

const quic::QuicConnection* EnvoyQuicClientSession::quicConnection() const {
return initialized_ ? connection() : nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it valid to get here when initialized_ is false? Should we try harder to ensure that Initialize() is called?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible when a filter wants to close it upon creation which happens before Initialize(). I added a unit test for that case. If we forget to call Initialize(), QUICHE code will omit tons of errors.

}

quic::QuicConnection* EnvoyQuicClientSession::quicConnection() {
return initialized_ ? connection() : nullptr;
}

void EnvoyQuicClientSession::OnTlsHandshakeComplete() {
raiseConnectionEvent(Network::ConnectionEvent::Connected);
}
Expand Down
3 changes: 3 additions & 0 deletions source/common/quic/envoy_quic_client_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ class EnvoyQuicClientSession : public QuicFilterManagerConnectionImpl,

// QuicFilterManagerConnectionImpl
bool hasDataToWrite() override;
// Used by base class to access quic connection after initialization.
const quic::QuicConnection* quicConnection() const override;
quic::QuicConnection* quicConnection() override;
Comment on lines +81 to +82
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you comment on why we need these, and when to use them instead of QuicSession::connection()?

Same in EnvoyQuicServerSession.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


private:
// These callbacks are owned by network filters and quic session should outlive
Expand Down
Loading