Internal QUICHE change
PiperOrigin-RevId: 321428930
Change-Id: I43a8489065b3207e861fb6f3bac5afbeaf51f994
diff --git a/quic/core/quic_dispatcher_test.cc b/quic/core/quic_dispatcher_test.cc
index 1d84b06..bd9bb7a 100644
--- a/quic/core/quic_dispatcher_test.cc
+++ b/quic/core/quic_dispatcher_test.cc
@@ -133,6 +133,7 @@
MOCK_METHOD(std::unique_ptr<QuicSession>,
CreateQuicSession,
(QuicConnectionId connection_id,
+ const QuicSocketAddress& self_address,
const QuicSocketAddress& peer_address,
quiche::QuicheStringPiece alpn,
const quic::ParsedQuicVersion& version),
@@ -441,7 +442,7 @@
QuicConnectionId connection_id = TestConnectionId(++connection_id_);
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(connection_id, client_address,
+ CreateQuicSession(connection_id, _, client_address,
Eq(ExpectedAlpnForVersion(version)), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, connection_id, client_address,
@@ -463,7 +464,7 @@
QuicConnectionId connection_id = TestConnectionId(++connection_id_);
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(connection_id, client_address, _, _))
+ CreateQuicSession(connection_id, _, client_address, _, _))
.Times(0);
ProcessFirstFlight(version, client_address, connection_id);
}
@@ -506,7 +507,7 @@
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(1), client_address,
+ CreateQuicSession(TestConnectionId(1), _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(1), client_address,
@@ -557,7 +558,7 @@
// Processing the second packet should create the new session.
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(server_connection_id, client_address,
+ CreateQuicSession(server_connection_id, _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, server_connection_id, client_address,
@@ -626,7 +627,7 @@
// Processing the packet should create a new session.
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(server_connection_id, client_address,
+ CreateQuicSession(server_connection_id, _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, server_connection_id, client_address,
@@ -651,7 +652,7 @@
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(1), client_address,
+ CreateQuicSession(TestConnectionId(1), _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(1), client_address,
@@ -668,7 +669,7 @@
ProcessFirstFlight(client_address, TestConnectionId(1));
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(2), client_address,
+ CreateQuicSession(TestConnectionId(2), _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(2), client_address,
@@ -698,7 +699,7 @@
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(1), client_address,
+ CreateQuicSession(TestConnectionId(1), _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(1), client_address,
@@ -726,7 +727,7 @@
CreateTimeWaitListManager();
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(
*time_wait_list_manager_,
SendVersionNegotiationPacket(TestConnectionId(1), _, _, _, _, _, _, _))
@@ -741,7 +742,7 @@
CreateTimeWaitListManager();
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(connection_id, _, _, _, _, _, _, _))
.Times(1);
@@ -754,7 +755,7 @@
CreateTimeWaitListManager();
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(
TestConnectionId(1), TestConnectionId(2), _, _, _, _, _, _))
@@ -767,7 +768,7 @@
CreateTimeWaitListManager();
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(_, _, _, _, _, _, _, _))
.Times(0);
@@ -791,7 +792,7 @@
CreateTimeWaitListManager();
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(_, _, _, _, _, _, _, _))
.Times(1);
@@ -810,7 +811,7 @@
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(_, client_address, Eq(ExpectedAlpn()), _))
+ CreateQuicSession(_, _, client_address, Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(1), client_address,
&mock_helper_, &mock_alarm_factory_, &crypto_config_,
@@ -838,7 +839,7 @@
// Create a new session.
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
QuicConnectionId connection_id = TestConnectionId(1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address,
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, connection_id, client_address,
@@ -879,7 +880,7 @@
QuicConnectionId connection_id = TestConnectionId(1);
// Dispatcher forwards all packets for this connection_id to the time wait
// list manager.
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
ProcessPacket(_, _, connection_id, _, _))
.Times(0);
@@ -900,7 +901,7 @@
QuicReceivedPacket packet(short_packet, 22, QuicTime::Zero());
char valid_size_packet[23] = {0x70, 0xa7, 0x02, 0x6c};
QuicReceivedPacket packet2(valid_size_packet, 23, QuicTime::Zero());
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
.Times(0);
@@ -927,7 +928,7 @@
QuicUtils::CreateReplacementConnectionId(bad_connection_id);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(fixed_connection_id, client_address,
+ CreateQuicSession(fixed_connection_id, _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, fixed_connection_id, client_address,
@@ -964,7 +965,7 @@
// validation is still enabled.
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(fixed_connection_id, client_address,
+ CreateQuicSession(fixed_connection_id, _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, fixed_connection_id, client_address,
@@ -995,7 +996,7 @@
QuicUtils::CreateReplacementConnectionId(bad_connection_id);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(1), client_address,
+ CreateQuicSession(TestConnectionId(1), _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(1), client_address,
@@ -1012,7 +1013,7 @@
ProcessFirstFlight(client_address, TestConnectionId(1));
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(fixed_connection_id, client_address,
+ CreateQuicSession(fixed_connection_id, _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, fixed_connection_id, client_address,
@@ -1045,7 +1046,7 @@
// dispatcher_ should drop this packet.
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(1), client_address, _, _))
+ CreateQuicSession(TestConnectionId(1), _, client_address, _, _))
.Times(0);
EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
@@ -1064,7 +1065,7 @@
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
// dispatcher_ should drop this packet.
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, client_address, _, _))
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, client_address, _, _))
.Times(0);
EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
@@ -1095,7 +1096,7 @@
0xC0, 'Q', '0', '4', '9', /*connection ID length byte*/ 0x50};
QuicReceivedPacket received_packet49(
packet49, kMinPacketSizeForVersionNegotiation, QuicTime::Zero());
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(_, _, _, _, _, _, _, _))
.Times(1);
@@ -1108,7 +1109,7 @@
0xC0, 'Q', '0', '4', '8', /*connection ID length byte*/ 0x50};
QuicReceivedPacket received_packet48(
packet48, kMinPacketSizeForVersionNegotiation, QuicTime::Zero());
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(_, _, _, _, _, _, _, _))
.Times(1);
@@ -1121,7 +1122,7 @@
0xC0, 'Q', '0', '4', '7', /*connection ID length byte*/ 0x50};
QuicReceivedPacket received_packet47(
packet47, kMinPacketSizeForVersionNegotiation, QuicTime::Zero());
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(_, _, _, _, _, _, _, _))
.Times(1);
@@ -1134,7 +1135,7 @@
0xC0, 'Q', '0', '4', '5', /*connection ID length byte*/ 0x50};
QuicReceivedPacket received_packet45(
packet45, kMinPacketSizeForVersionNegotiation, QuicTime::Zero());
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(_, _, _, _, _, _, _, _))
.Times(1);
@@ -1147,7 +1148,7 @@
0xFF, 'Q', '0', '4', '4', /*connection ID length byte*/ 0x50};
QuicReceivedPacket received_packet44(
packet44, kMinPacketSizeForVersionNegotiation, QuicTime::Zero());
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_,
SendVersionNegotiationPacket(_, _, _, _, _, _, _, _))
.Times(1);
@@ -1180,7 +1181,7 @@
SendVersionNegotiationPacket(server_connection_id, client_connection_id,
ietf_quic, use_length_prefix, _, _, _, _))
.Times(1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
dispatcher_->ProcessPacket(server_address_, client_address, *received_packet);
}
@@ -1209,7 +1210,7 @@
SendVersionNegotiationPacket(server_connection_id, client_connection_id,
ietf_quic, use_length_prefix, _, _, _, _))
.Times(1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
dispatcher_->ProcessPacket(server_address_, client_address, *received_packet);
}
@@ -1260,7 +1261,7 @@
QuicEncryptedPacket encrypted(packet, sizeof(packet), false);
std::unique_ptr<QuicReceivedPacket> received_packet(
ConstructReceivedPacket(encrypted, mock_helper_.GetClock()->Now()));
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
dispatcher_->ProcessPacket(server_address_, client_address, *received_packet);
@@ -1304,7 +1305,7 @@
QuicEncryptedPacket encrypted(packet, sizeof(packet), false);
std::unique_ptr<QuicReceivedPacket> received_packet(
ConstructReceivedPacket(encrypted, mock_helper_.GetClock()->Now()));
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
dispatcher_->ProcessPacket(server_address_, client_address, *received_packet);
@@ -1356,7 +1357,7 @@
sizeof(packet), false);
std::unique_ptr<QuicReceivedPacket> received_packet(
ConstructReceivedPacket(encrypted, mock_helper_.GetClock()->Now()));
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
dispatcher_->ProcessPacket(server_address_, client_address, *received_packet);
@@ -1386,7 +1387,7 @@
CreateTimeWaitListManager();
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, SendPacket(_, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
.Times(0);
@@ -1447,7 +1448,7 @@
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(1), client_address,
+ CreateQuicSession(TestConnectionId(1), _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(1), client_address,
@@ -1465,7 +1466,7 @@
// No more new connections afterwards.
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(2), client_address,
+ CreateQuicSession(TestConnectionId(2), _, client_address,
Eq(ExpectedAlpn()), _))
.Times(0u);
ProcessFirstFlight(client_address, TestConnectionId(2));
@@ -1486,7 +1487,7 @@
// No more new connections afterwards.
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(2), client_address,
+ CreateQuicSession(TestConnectionId(2), _, client_address,
Eq(ExpectedAlpn()), _))
.Times(0u);
ProcessFirstFlight(client_address, TestConnectionId(2));
@@ -1495,7 +1496,7 @@
EXPECT_TRUE(dispatcher_->accept_new_connections());
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(1), client_address,
+ CreateQuicSession(TestConnectionId(1), _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(1), client_address,
@@ -1537,7 +1538,7 @@
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
QuicConnectionId connection_id = TestConnectionId(1);
- EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _)).Times(0);
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, _, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
.Times(0);
@@ -1578,7 +1579,7 @@
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(_, client_address, Eq(ExpectedAlpn()), _))
+ CreateQuicSession(_, _, client_address, Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(1), client_address,
&helper_, &alarm_factory_, &crypto_config_,
@@ -1594,7 +1595,7 @@
ProcessFirstFlight(client_address, TestConnectionId(1));
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(_, client_address, Eq(ExpectedAlpn()), _))
+ CreateQuicSession(_, _, client_address, Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(2), client_address,
&helper_, &alarm_factory_, &crypto_config_,
@@ -1920,8 +1921,8 @@
// When CHLO arrives, a new session should be created, and all packets
// buffered should be delivered to the session.
- EXPECT_CALL(*dispatcher_,
- CreateQuicSession(conn_id, client_addr_, Eq(ExpectedAlpn()), _))
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(conn_id, _, client_addr_,
+ Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, conn_id, client_addr_, &mock_helper_,
&mock_alarm_factory_, &crypto_config_,
@@ -1955,8 +1956,8 @@
data_connection_map_[conn_id].pop_back();
// When CHLO arrives, a new session should be created, and all packets
// buffered should be delivered to the session.
- EXPECT_CALL(*dispatcher_,
- CreateQuicSession(conn_id, client_addr_, Eq(ExpectedAlpn()), _))
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(conn_id, _, client_addr_,
+ Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, conn_id, client_addr_, &mock_helper_,
&mock_alarm_factory_, &crypto_config_,
@@ -2007,7 +2008,7 @@
ShouldCreateOrBufferPacketForConnection(
ReceivedPacketInfoConnectionIdEquals(conn_id)));
}
- EXPECT_CALL(*dispatcher_, CreateQuicSession(conn_id, client_address,
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(conn_id, _, client_address,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, conn_id, client_address, &mock_helper_,
@@ -2035,8 +2036,8 @@
QuicConnectionId conn_id = TestConnectionId(1);
EXPECT_CALL(*dispatcher_, ShouldCreateOrBufferPacketForConnection(
ReceivedPacketInfoConnectionIdEquals(conn_id)));
- EXPECT_CALL(*dispatcher_,
- CreateQuicSession(conn_id, client_addr_, Eq(ExpectedAlpn()), _))
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(conn_id, _, client_addr_,
+ Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, conn_id, client_addr_, &mock_helper_,
&mock_alarm_factory_, &crypto_config_,
@@ -2055,8 +2056,8 @@
// When CHLO arrives, a new session should be created, and all packets
// buffered should be delivered to the session.
- EXPECT_CALL(*dispatcher_,
- CreateQuicSession(conn_id, client_addr_, Eq(ExpectedAlpn()), _))
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(conn_id, _, client_addr_,
+ Eq(ExpectedAlpn()), _))
.Times(1) // Only triggered by 1st CHLO.
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, conn_id, client_addr_, &mock_helper_,
@@ -2125,7 +2126,7 @@
ReceivedPacketInfoConnectionIdEquals(TestConnectionId(conn_id))));
if (conn_id <= kMaxNumSessionsToCreate) {
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(conn_id), client_addr_,
+ CreateQuicSession(TestConnectionId(conn_id), _, client_addr_,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(conn_id),
@@ -2160,7 +2161,7 @@
conn_id <= kMaxNumSessionsToCreate + kDefaultMaxConnectionsInStore;
++conn_id) {
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(conn_id), client_addr_,
+ CreateQuicSession(TestConnectionId(conn_id), _, client_addr_,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(conn_id), client_addr_,
@@ -2176,7 +2177,7 @@
})));
}
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(kNumCHLOs), client_addr_,
+ CreateQuicSession(TestConnectionId(kNumCHLOs), _, client_addr_,
Eq(ExpectedAlpn()), _))
.Times(0);
@@ -2196,7 +2197,7 @@
// Last CHLO will be buffered. Others will create connection right away.
if (conn_id <= kMaxNumSessionsToCreate) {
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(conn_id), client_addr_,
+ CreateQuicSession(TestConnectionId(conn_id), _, client_addr_,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(conn_id),
@@ -2223,7 +2224,7 @@
size_t packets_buffered = 2;
// Reset counter and process buffered CHLO.
- EXPECT_CALL(*dispatcher_, CreateQuicSession(last_connection, client_addr_,
+ EXPECT_CALL(*dispatcher_, CreateQuicSession(last_connection, _, client_addr_,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, last_connection, client_addr_,
@@ -2249,7 +2250,7 @@
// Last CHLO will be buffered. Others will create connection right away.
if (conn_id <= kMaxNumSessionsToCreate) {
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(conn_id), client_addr_,
+ CreateQuicSession(TestConnectionId(conn_id), _, client_addr_,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(conn_id),
@@ -2277,8 +2278,9 @@
}
// Reset counter and process buffered CHLO.
- EXPECT_CALL(*dispatcher_, CreateQuicSession(last_connection_id, client_addr_,
- Eq(ExpectedAlpn()), _))
+ EXPECT_CALL(*dispatcher_,
+ CreateQuicSession(last_connection_id, _, client_addr_,
+ Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, last_connection_id, client_addr_,
&mock_helper_, &mock_alarm_factory_, &crypto_config_,
@@ -2313,7 +2315,7 @@
++conn_id) {
if (conn_id <= kMaxNumSessionsToCreate + 1) {
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(conn_id), client_addr_,
+ CreateQuicSession(TestConnectionId(conn_id), _, client_addr_,
Eq(ExpectedAlpn()), _))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(conn_id),
@@ -2355,7 +2357,7 @@
if (conn_id <= kMaxNumSessionsToCreate) {
EXPECT_CALL(
*dispatcher_,
- CreateQuicSession(TestConnectionId(conn_id), client_addr_,
+ CreateQuicSession(TestConnectionId(conn_id), _, client_addr_,
Eq(ExpectedAlpnForVersion(version)), version))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(conn_id),
@@ -2381,7 +2383,7 @@
ParsedQuicVersion version =
supported_versions[(conn_id - 1) % supported_versions.size()];
EXPECT_CALL(*dispatcher_,
- CreateQuicSession(TestConnectionId(conn_id), client_addr_,
+ CreateQuicSession(TestConnectionId(conn_id), _, client_addr_,
Eq(ExpectedAlpnForVersion(version)), version))
.WillOnce(Return(ByMove(CreateSession(
dispatcher_.get(), config_, TestConnectionId(conn_id), client_addr_,