Skip to content

Commit

Permalink
Silo Improvements on Client Side (#3248) (#3252)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Nov 29, 2022
1 parent 5d19354 commit cee4eee
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/core/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -2465,6 +2465,7 @@ QuicConnSetConfiguration(
Configuration);

QuicConfigurationAddRef(Configuration);
QuicConfigurationAttachSilo(Configuration);
Connection->Configuration = Configuration;
QuicConnApplyNewSettings(
Connection,
Expand All @@ -2482,7 +2483,7 @@ QuicConnSetConfiguration(
QuicConnOnQuicVersionSet(Connection);
Status = QuicCryptoOnVersionChange(&Connection->Crypto);
if (QUIC_FAILED(Status)) {
return Status;
goto Error;
}
}

Expand All @@ -2507,7 +2508,8 @@ QuicConnSetConfiguration(
"Allocation of '%s' failed. (%llu bytes)",
"OrigDestCID",
sizeof(QUIC_CID) + DestCid->CID.Length);
return QUIC_STATUS_OUT_OF_MEMORY;
Status = QUIC_STATUS_OUT_OF_MEMORY;
goto Error;
}

Connection->OrigDestCID->Length = DestCid->CID.Length;
Expand All @@ -2520,13 +2522,13 @@ QuicConnSetConfiguration(
if (!QuicConnPostAcceptValidatePeerTransportParameters(Connection)) {
QuicConnTransportError(Connection, QUIC_ERROR_CONNECTION_REFUSED);
Status = QUIC_STATUS_INVALID_PARAMETER;
goto Error;
goto Cleanup;
}
}

Status = QuicConnGenerateLocalTransportParameters(Connection, &LocalTP);
if (QUIC_FAILED(Status)) {
goto Error;
goto Cleanup;
}

//
Expand All @@ -2551,10 +2553,14 @@ QuicConnSetConfiguration(
Configuration->SecurityConfig,
&LocalTP);

Error:
Cleanup:

QuicCryptoTlsCleanupTransportParameters(&LocalTP);

Error:

QuicConfigurationDetachSilo();

return Status;
}

Expand Down

0 comments on commit cee4eee

Please sign in to comment.