Skip to content

Commit

Permalink
quic: add quic info to quic sockets (envoyproxy#34213)
Browse files Browse the repository at this point in the history
Signed-off-by: Renjie Tang <renjietang@google.com>
  • Loading branch information
RenjieTang committed May 21, 2024
1 parent 81d7f25 commit 08034f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ minor_behavior_changes:
``%UPSTREAM_REMOTE_PORT%`` and ``%UPSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%`` access log format specifiers.
This behavior can be reverted by setting the runtime guard
``envoy.reloadable_features.upstream_remote_address_use_connection`` to false.
- area: quic
change: |
When a quic connection socket is created, the socket's detected transport protocol will be set to "quic".
bug_fixes:
# *Changes expected to improve the state of the world and are unlikely to have negative effects*
Expand Down
3 changes: 2 additions & 1 deletion source/common/quic/envoy_quic_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ createConnectionSocket(const Network::Address::InstanceConstSharedPtr& peer_addr
}
auto connection_socket = std::make_unique<Network::ConnectionSocketImpl>(
Network::Socket::Type::Datagram, local_addr, peer_addr, Network::SocketCreationOptions{});
connection_socket->setDetectedTransportProtocol("quic");
if (!connection_socket->isOpen()) {
ENVOY_LOG_MISC(error, "Failed to create socket");
ENVOY_LOG_MISC(error, "Failed to create quic socket");
return connection_socket;
}
connection_socket->addOptions(Network::SocketOptionFactory::buildIpPacketInfoOptions());
Expand Down

0 comments on commit 08034f4

Please sign in to comment.