Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update handler.go #113

Merged
merged 7 commits into from
Dec 26, 2023
Merged

Conversation

Leon777-coder
Copy link
Contributor

issue#413

@brianchennn
Copy link
Contributor

please fix the linter error

@brianchennn brianchennn force-pushed the Leon777-coder-patch-1 branch from 9d72595 to 76557fc Compare November 27, 2023 14:49
@brianchennn brianchennn self-requested a review November 30, 2023 17:05
@brianchennn
Copy link
Contributor

This PR fix the issue: free5gc/free5gc#413

@@ -99,6 +99,9 @@ func SearchAmfCommunicationInstance(ue *amf_context.AmfUe, nrfUri string, target
// select the first AMF, TODO: select base on other info
var amfUri string
for _, nfProfile := range resp.NfInstances {
if nfProfile.NfInstanceId == amf_context.GetSelf().NfId {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this check added because you got the current AMF as the query response from NRF? If that is the case, I think it is the query condition that has an issue to be fixed. (The exclusion check is fine and can be kept here since it is impossible to communicate with AMF itself. Just want to make sure if the codes of querying the target AMF is correct or not.)

@@ -1226,6 +1236,7 @@ func handleRequestedNssai(ue *context.AmfUe, anType models.AccessType) error {
// Condition (B) Step 7: initial AMF can not find Target AMF via NRF -> Send Reroute NAS Request to RAN
allowedNssaiNgap := ngapConvert.AllowedNssaiToNgap(ue.AllowedNssai[anType])
ngap_message.SendRerouteNasRequest(ue, anType, nil, ue.RanUe[anType].InitialUEMessage, &allowedNssaiNgap)
return err
Copy link

@ss920386 ss920386 Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be also considered for line 1234 callback.SendN1MessageNotifyAtAMFReAllocation(ue, n1Message.Bytes(), &registerContext)? Otherwise, will RegAceept be sent by the current AMF even when it requests for AMF Re-allocation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Leon777-coder, Please add error return after line 1234.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it what the line 1241 doing?

Whenever this handler reach the needSliceSelection state (which goes all the way down to the line 1234 if no error occurs), it will return nil there (the line 1241). No further operation will be executed. Not to mention RegAccept in this situation.

@brianchennn brianchennn self-requested a review December 12, 2023 09:08
return error added
line 1235
[return nill] deleted, since it will reach the following return
@tim-ywliu tim-ywliu merged commit 21aa437 into free5gc:main Dec 26, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants