Index: net/tools/quic/quic_dispatcher.h |
diff --git a/net/tools/quic/quic_dispatcher.h b/net/tools/quic/quic_dispatcher.h |
index 4b3fe0a00170dd197e3af427c4057e7463fa3396..fb9df23478c4653beb0c8cf52b07b6a3297878df 100644 |
--- a/net/tools/quic/quic_dispatcher.h |
+++ b/net/tools/quic/quic_dispatcher.h |
@@ -139,6 +139,17 @@ class QuicDispatcher : public QuicServerSessionVisitor, |
virtual bool OnUnauthenticatedPublicHeader( |
const QuicPacketPublicHeader& header); |
+ // Called by OnUnauthenticatedPublicHeader when the packet is not for a |
+ // connection that the dispatcher has a record of, but is not handled by |
+ // certain simple processing rules. This method may apply validity checks to |
+ // reject stray packets. If the packet appears to be valid, it calls |
+ // CreateQuicSession to create a new session for the packet. Returns the |
+ // QuicSession that was created, or nullptr if the packet failed the validity |
+ // checks. |
+ virtual QuicSession* AdditionalValidityChecksThenCreateSession( |
+ const QuicPacketPublicHeader& header, |
+ QuicConnectionId connection_id); |
+ |
// Create and return the time wait list manager for this dispatcher, which |
// will be owned by the dispatcher as time_wait_list_manager_ |
virtual QuicTimeWaitListManager* CreateQuicTimeWaitListManager(); |
@@ -187,7 +198,7 @@ class QuicDispatcher : public QuicServerSessionVisitor, |
class PacketWriterFactoryAdapter : |
public QuicConnection::PacketWriterFactory { |
public: |
- PacketWriterFactoryAdapter(QuicDispatcher* dispatcher); |
+ explicit PacketWriterFactoryAdapter(QuicDispatcher* dispatcher); |
~PacketWriterFactoryAdapter() override; |
QuicPacketWriter* Create(QuicConnection* connection) const override; |