Skip to content

Commit

Permalink
Fix AMF crash (#402)
Browse files Browse the repository at this point in the history
AMF sent Initial Context Setup message to gNB, but before gNB
initiated context release while context setup was in-progress.
This leads to PDU session release and later when Initial Context
Setup failure is received from the gNodeB, amf failed to find
pdu-session.

its wise to just process initial context setup failure message
at AMF & skip processing which sends message towards SMF.

Signed-off-by: Ajay Lotan Thakur <[email protected]>
  • Loading branch information
thakurajayL authored Feb 15, 2025
1 parent 47e425b commit c700862
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ngap/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2469,7 +2469,8 @@ func HandleInitialContextSetupFailure(ran *context.AmfRan, message *ngapType.NGA
transfer := item.PDUSessionResourceSetupUnsuccessfulTransfer
smContext, ok := amfUe.SmContextFindByPDUSessionID(pduSessionID)
if !ok {
ranUe.Log.Errorf("SmContext[PDU Session ID:%d] not found", pduSessionID)
ranUe.Log.Errorf("SmContext[PDU Session ID:%d] not found. No need to send UpdateSmContext message to SMF", pduSessionID)
continue
}
_, _, _, err := consumer.SendUpdateSmContextN2Info(amfUe, smContext,
models.N2SmInfoType_PDU_RES_SETUP_FAIL, transfer)
Expand Down

0 comments on commit c700862

Please sign in to comment.