-
Notifications
You must be signed in to change notification settings - Fork 55
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
Send Deregistration Notify before UDM modifies the UE context #25
Changes from 2 commits
a45917d
ed1d765
1e3da75
83c271b
f46e0a6
dfcd551
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,6 +217,22 @@ func RegistrationAmf3gppAccessProcedure(registerRequest models.Amf3GppAccessRegi | |
ue, _ := udm_context.Getself().UdmUeFindBySupi(ueID) | ||
oldAmf3GppAccessRegContext = ue.Amf3GppAccessRegistration | ||
} | ||
// TS 23.502 4.2.2.2.2 14d: UDM initiate a Nudm_UECM_DeregistrationNotification to the old AMF | ||
// corresponding to the same (e.g. 3GPP) access, if one exists | ||
if oldAmf3GppAccessRegContext != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why move dereg procedure here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can create the goroutine for sending deregistration notifications. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, see #25 (comment) |
||
deregistData := models.DeregistrationData{ | ||
DeregReason: models.DeregistrationReason_SUBSCRIPTION_WITHDRAWN, | ||
AccessType: models.AccessType__3_GPP_ACCESS, | ||
} | ||
// Deregistration Notify Triggered | ||
pd := callback.SendOnDeregistrationNotification(ueID, | ||
oldAmf3GppAccessRegContext.DeregCallbackUri, | ||
deregistData, | ||
) | ||
if pd != nil { | ||
return nil, nil, pd | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rewrite like this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This handler deals with the 3GPP access case. Why do we need to check the non-3GPP access context? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to R15 TS 29.503 - 5.3.2.2.2 AMF registration for 3GPP access,
If the old Amf3GppAccessRegistration context exists, it should return "204 No Content" with an empty response body. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @YouShengLiu Please see TS 23.502 4.2.2.2.1 Step 14d:
So, we need to check whether the access type is 3GPP or not if there is the UECM context for the same UE. |
||
|
||
udm_context.Getself().CreateAmf3gppRegContext(ueID, registerRequest) | ||
|
||
|
@@ -245,23 +261,13 @@ func RegistrationAmf3gppAccessProcedure(registerRequest models.Amf3GppAccessRegi | |
} | ||
}() | ||
|
||
// TS 23.502 4.2.2.2.2 14d: UDM initiate a Nudm_UECM_DeregistrationNotification to the old AMF | ||
// corresponding to the same (e.g. 3GPP) access, if one exists | ||
if oldAmf3GppAccessRegContext != nil { | ||
deregistData := models.DeregistrationData{ | ||
DeregReason: models.DeregistrationReason_SUBSCRIPTION_WITHDRAWN, | ||
AccessType: models.AccessType__3_GPP_ACCESS, | ||
} | ||
callback.SendOnDeregistrationNotification(ueID, oldAmf3GppAccessRegContext.DeregCallbackUri, | ||
deregistData) // Deregistration Notify Triggered | ||
|
||
return nil, nil, nil | ||
} else { | ||
if oldAmf3GppAccessRegContext == nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this condition is unnecessary because the UDM sent the dereg notification to the old AMF. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the UE is initially registered with the UDM through the AMF, it triggers the execution of this function block. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if old context was existed, it should reply StatusOK with new request in body There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see #25 (comment) |
||
header = make(http.Header) | ||
udmUe, _ := udm_context.Getself().UdmUeFindBySupi(ueID) | ||
header.Set("Location", udmUe.GetLocationURI(udm_context.LocationUriAmf3GppAccessRegistration)) | ||
return header, ®isterRequest, nil | ||
} | ||
return nil, nil, nil | ||
} | ||
|
||
// TS 29.503 5.3.2.2.3 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In HandleRegistrationAmf3gppAccessRequest():
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YouShengLiu you missed this patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will supplement it.