Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: net/quic/chromium/quic_connection_logger.cc

Issue 2438613007: When a QUIC PublicReset packet is received, Log the client IP from both the SHLO and the PublicReset (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_connection_logger.cc
diff --git a/net/quic/chromium/quic_connection_logger.cc b/net/quic/chromium/quic_connection_logger.cc
index 4f096e1592cc018c838a84c0bc250b9d2224fe2e..b687de1929c0d93b97b50a60d8599cc086b6b367 100644
--- a/net/quic/chromium/quic_connection_logger.cc
+++ b/net/quic/chromium/quic_connection_logger.cc
@@ -223,6 +223,16 @@ std::unique_ptr<base::Value> NetLogQuicVersionNegotiationPacketCallback(
return std::move(dict);
}
+std::unique_ptr<base::Value> NetLogQuicPublicResetPacketCallback(
+ const IPEndPoint* server_hello_address,
+ const IPEndPoint* public_reset_address,
+ NetLogCaptureMode /* capture_mode */) {
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ dict->SetString("server_hello_address", server_hello_address->ToString());
+ dict->SetString("public_reset_address", public_reset_address->ToString());
+ return std::move(dict);
+}
+
std::unique_ptr<base::Value> NetLogQuicCryptoHandshakeMessageCallback(
const CryptoHandshakeMessage* message,
NetLogCaptureMode /* capture_mode */) {
@@ -625,7 +635,10 @@ void QuicConnectionLogger::OnPingFrame(const QuicPingFrame& frame) {
void QuicConnectionLogger::OnPublicResetPacket(
const QuicPublicResetPacket& packet) {
- net_log_.AddEvent(NetLogEventType::QUIC_SESSION_PUBLIC_RESET_PACKET_RECEIVED);
+ net_log_.AddEvent(
+ NetLogEventType::QUIC_SESSION_PUBLIC_RESET_PACKET_RECEIVED,
+ base::Bind(&NetLogQuicPublicResetPacketCallback,
+ &local_address_from_shlo_, &packet.client_address));
UpdatePublicResetAddressMismatchHistogram(local_address_from_shlo_,
packet.client_address);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698