Section: 5.3.7.5 Reception of the RRCReestablishment by the UE
Content: The UE shall: 1> stop timer T301; 1> consider the current cell to be the PCell; 1> update the KgNB key based on the current KgNB key or the NH, using the received nextHopChainingCount value, as specified in TS 33.501[ Security architecture and procedures for 5G System ]  [11]; 1> store the nextHopChainingCount value indicated in the RRCReestablishment message; 1> derive the KRRCenc and KUPenc keys associated with the previously configured cipheringAlgorithm, as specified in TS 33.501[ Security architecture and procedures for 5G System ]  [11]; 1> derive the KRRCint and KUPint keys associated with the previously configured integrityProtAlgorithm, as specified in TS 33.501[ Security architecture and procedures for 5G System ]  [11]. 1> request lower layers to verify the integrity protection of the RRCReestablishment message, using the previously configured algorithm and the KRRCint key; 1> if the integrity protection check of the RRCReestablishment message fails: 2> perform the actions upon going to RRC_IDLE as specified in 5.3.11, with release cause 'RRC connection failure', upon which the procedure ends; 1> configure lower layers to resume integrity protection for SRB1 using the previously configured algorithm and the KRRCint key immediately, i.e., integrity protection shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure; 1> configure lower layers to resume ciphering for SRB1 using the previously configured algorithm and, the KRRCenc key immediately, i.e., ciphering shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure; 1> release the measurement gap configuration indicated by the measGapConfig, if configured; 1> release the MUSIM gap configuration indicated by the musim-GapConfig, if configured; 1> release the FR2 UL gap configuration indicated by the ul-GapFR2-Config, if configured; 1> perform the L2 U2N Remote UE configuration procedure in accordance with the received sl-L2RemoteUE-Config as specified in 5.3.5.16; 1> set the content of RRCReestablishmentComplete message as follows: 2> if the UE has logged measurements available for NR and if the RPLMN is included in plmn-IdentityList stored in VarLogMeasReport; or 2> if the UE has logged measurements available for NR and if the current registered SNPN are included in snpn-ConfigIDList stored in VarLogMeasReport: 3> include the logMeasAvailable in the RRCReestablishmentComplete message; 3> if Bluetooth measurement results are included in the logged measurements the UE has available for NR: 4> include the logMeasAvailableBT in the RRCReestablishmentComplete message; 3> if WLAN measurement results are included in the logged measurements the UE has available for NR: 4> include the logMeasAvailableWLAN in the RRCReestablishmentComplete message; 2> if the sigLoggedMeasType in VarLogMeasReport is included; or 2> if the UE is capable of reporting availability of signalling based logged MDT for inter-RAT (i.e. LTE to NR), and if the sigLoggedMeasType in VarLogMeasReport of TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [10] is included: 3> if T330 timer is running (associated to the logged measurement configuration for NR or for LTE): 4> set sigLogMeasConfigAvailable to true in the RRCReestablishmentComplete message; 3> else: 4> if the UE has logged measurements: 5> set sigLogMeasConfigAvailable to false in the RRCReestablishmentComplete message; 2> if the UE has connection establishment failure or connection resume failure information available in VarConnEstFailReport or VarConnEstFailReportList and if the RPLMN is equal to plmn-Identity stored in VarConnEstFailReport or in at least one of the entries of VarConnEstFailReportList; or 2> if the UE supports multiple CEF report and if the UE has connection establishment failure information or connection resume failure information available in VarConnEstFailReport or VarConnEstFailReportList and if the registered SNPN identity is equal to snpn-identity stored in VarConnEstFailReport or any entry of VarConnEstFailReportList: 3> include connEstFailInfoAvailable in the RRCReestablishmentComplete message; 2> if the UE has radio link failure or handover failure information available in VarRLF-Report and if the RPLMN is included in plmn-IdentityList stored in VarRLF-Report; or 2> if the UE has radio link failure or handover failure information available in VarRLF-Report of TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [10] and if the UE is capable of cross-RAT RLF reporting and if the RPLMN is included in plmn-IdentityList stored in VarRLF-Report of TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [10]; or 2> if the UE has radio link failure or handover failure information available in VarRLF-Report and if the current registered SNPN is included in snpn-IdentityList stored in VarRLF-Report: 3> include rlf-InfoAvailable in the RRCReestablishmentComplete message; 2> if the UE has successful handover information available in VarSuccessHO-Report and if the RPLMN is included in plmn-IdentityList stored in VarSuccessHO-Report; or 2> if the UE has successful handover information available in VarSuccessHO-Report and if the current registered SNPN is included in snpn-IdentityList stored in the VarSuccessHO-Report: 3> include successHO-InfoAvailable in the RRCReestablishmentComplete message; 2> if the UE has successful PSCell change or addition information available in VarSuccessPSCell-Report and if the RPLMN is included in plmn-IdentityList stored in VarSuccessPSCell-Report; or 2> if the UE has successful PSCell change or addition information available in VarSuccessPSCell-Report and if the current registered SNPN is included in snpn-IdentityList stored in the VarSuccessPSCell-Report: 3> include successPSCell-InfoAvailable in the RRCReestablishmentComplete message; 2> if the UE has flight path information available: 3> if the UE had not previously provided a flight path information since last entering RRC_CONNECTED state; or 3> if at least one waypoint was not previously provided; or 3> if at least one upcoming waypoint that was previously provided is being removed; or 3> if flightPathUpdateDistanceThr is configured and for at least one waypoint, the 3D distance between the previously provided location and the new location is more than or equal to the distance threshold configured by flightPathUpdateDistanceThr; or 3> if flightPathUpdateTimeThr is configured and for at least one waypoint, the timestamp was not previously provided but is now available, or the time between the previously provided timestamp and the new timestamp, if available, is more than or equal to the time threshold configured by flightPathUpdateTimeThr: 4> include flightPathInfoAvailable; NOTE: If neither flightPathUpdateDistanceThr nor flightPathUpdateTimeThr is configured, it is up to UE implementation whether to include flightPathInfoAvailable when updated flight path information is available. 1> submit the RRCReestablishmentComplete message to lower layers for transmission; 1> if SIB21 is provided by the PCell: 2> if the UE initiated transmission of an MBSInterestIndication message during the last 1 second preceding detection of radio link failure: 3> initiate transmission of an MBSInterestIndication message in accordance with 5.9.4; 1> the procedure ends.