@@ -92,6 +92,9 @@ QuicSettingsSetDefault(
9292 if (!Settings -> AppSet .MaxBytesPerKey ) {
9393 Settings -> MaxBytesPerKey = QUIC_DEFAULT_MAX_BYTES_PER_KEY ;
9494 }
95+ if (!Settings -> AppSet .ServerResumptionLevel ) {
96+ Settings -> ServerResumptionLevel = QUIC_DEFAULT_SERVER_RESUMPTION_LEVEL ;
97+ }
9598}
9699
97100_IRQL_requires_max_ (PASSIVE_LEVEL )
@@ -176,6 +179,9 @@ QuicSettingsCopy(
176179 if (!Settings -> AppSet .MaxBytesPerKey ) {
177180 Settings -> MaxBytesPerKey = ParentSettings -> MaxBytesPerKey ;
178181 }
182+ if (!Settings -> AppSet .ServerResumptionLevel ) {
183+ Settings -> ServerResumptionLevel = ParentSettings -> ServerResumptionLevel ;
184+ }
179185}
180186
181187_IRQL_requires_max_ (PASSIVE_LEVEL )
@@ -455,6 +461,19 @@ QuicSettingsLoad(
455461 Settings -> MaxBytesPerKey = QUIC_DEFAULT_MAX_BYTES_PER_KEY ;
456462 }
457463 }
464+
465+ if (!Settings -> AppSet .ServerResumptionLevel ) {
466+ ValueLen = sizeof (Value );
467+ QuicStorageReadValue (
468+ Storage ,
469+ QUIC_SETTING_SERVER_RESUMPTION_OR_ZERORTT ,
470+ (uint8_t * )& Value ,
471+ & ValueLen );
472+ if (Value > QUIC_SERVER_RESUME_AND_ZERORTT ) {
473+ Value = QUIC_SERVER_RESUME_AND_ZERORTT ;
474+ }
475+ Settings -> ServerResumptionLevel = (uint8_t )Value ;
476+ }
458477}
459478
460479_IRQL_requires_max_ (PASSIVE_LEVEL )
@@ -488,4 +507,5 @@ QuicSettingsDump(
488507 QuicTraceLogVerbose (SettingDumpStreamRecvBufferDefault , "[sett] StreamRecvBufferDefault= %u" , Settings -> StreamRecvBufferDefault );
489508 QuicTraceLogVerbose (SettingDumpConnFlowControlWindow , "[sett] ConnFlowControlWindow = %u" , Settings -> ConnFlowControlWindow );
490509 QuicTraceLogVerbose (SettingDumpMaxBytesPerKey , "[sett] MaxBytesPerKey = %llu" , Settings -> MaxBytesPerKey );
510+ QuicTraceLogVerbose (SettingDumpServerResumptionLevel , "[sett] ServerResumptionLevel = %hhu" , Settings -> ServerResumptionLevel );
491511}
0 commit comments