Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions src/core/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ QuicConnFree(
_In_ __drv_freesMem(Mem) QUIC_CONNECTION* Connection
)
{
#ifdef QUIC_SILO
QUIC_SILO Silo = NULL;
QuicConfigurationAttachSilo(Connection->Configuration);
#endif

CXPLAT_FRE_ASSERT(!Connection->State.Freed);
CXPLAT_TEL_ASSERT(Connection->RefCount == 0);
if (Connection->State.ExternalOwner) {
Expand Down Expand Up @@ -372,6 +377,15 @@ QuicConnFree(
QuicDatagramSendShutdown(&Connection->Datagram);
QuicDatagramUninitialize(&Connection->Datagram);
if (Connection->Configuration != NULL) {
#ifdef QUIC_SILO
//
// Take a ref on the silo before releasing the configuration
// to prevent the silo from being destroyed while we are still
// holding onto the thread to clean up other stuff for this connection.
//
Silo = Connection->Configuration->Silo;
QuicSiloAddRef(Silo);
#endif
QuicConfigurationRelease(Connection->Configuration);
Connection->Configuration = NULL;
}
Expand Down Expand Up @@ -413,6 +427,10 @@ QuicConnFree(
InterlockedDecrement(&MsQuicLib.ConnectionCount);
#endif
QuicPerfCounterDecrement(QUIC_PERF_COUNTER_CONN_ACTIVE);
#ifdef QUIC_SILO
QuicConfigurationDetachSilo();
QuicSiloRelease(Silo);
#endif
}

_IRQL_requires_max_(PASSIVE_LEVEL)
Expand Down
3 changes: 2 additions & 1 deletion src/platform/datapath_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ CxPlatDataPathProcessCqe(
case CXPLAT_CQE_TYPE_SOCKET_IO: {
DATAPATH_IO_SQE* Sqe =
CONTAINING_RECORD(CxPlatCqeUserData(Cqe), DATAPATH_IO_SQE, DatapathSqe);
if (Sqe->IoType == DATAPATH_XDP_IO_RECV || Sqe->IoType == DATAPATH_XDP_IO_SEND) {
if ((DATAPATH_XDP_IO_TYPE)Sqe->IoType == DATAPATH_XDP_IO_RECV ||
(DATAPATH_XDP_IO_TYPE)Sqe->IoType == DATAPATH_XDP_IO_SEND) {
RawDataPathProcessCqe(Cqe);
} else {
DataPathProcessCqe(Cqe);
Expand Down
8 changes: 4 additions & 4 deletions src/platform/tls_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ CxPlatTlsCertificateVerifyCallback(
return status;
}

CXPLAT_STATIC_ASSERT((int)ssl_encryption_initial == (int)QUIC_PACKET_KEY_INITIAL, "Code assumes exact match!");
CXPLAT_STATIC_ASSERT((int)ssl_encryption_early_data == (int)QUIC_PACKET_KEY_0_RTT, "Code assumes exact match!");
CXPLAT_STATIC_ASSERT((int)ssl_encryption_handshake == (int)QUIC_PACKET_KEY_HANDSHAKE, "Code assumes exact match!");
CXPLAT_STATIC_ASSERT((int)ssl_encryption_application == (int)QUIC_PACKET_KEY_1_RTT, "Code assumes exact match!");
CXPLAT_STATIC_ASSERT((QUIC_PACKET_KEY_TYPE)ssl_encryption_initial == QUIC_PACKET_KEY_INITIAL, "Code assumes exact match!");
CXPLAT_STATIC_ASSERT((QUIC_PACKET_KEY_TYPE)ssl_encryption_early_data == QUIC_PACKET_KEY_0_RTT, "Code assumes exact match!");
CXPLAT_STATIC_ASSERT((QUIC_PACKET_KEY_TYPE)ssl_encryption_handshake == QUIC_PACKET_KEY_HANDSHAKE, "Code assumes exact match!");
CXPLAT_STATIC_ASSERT((QUIC_PACKET_KEY_TYPE)ssl_encryption_application == QUIC_PACKET_KEY_1_RTT, "Code assumes exact match!");

void
CxPlatTlsNegotiatedCiphers(
Expand Down
Loading