-
Notifications
You must be signed in to change notification settings - Fork 56
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 3 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 |
---|---|---|
|
@@ -213,8 +213,10 @@ func RegistrationAmf3gppAccessProcedure(registerRequest models.Amf3GppAccessRegi | |
) { | ||
// TODO: EPS interworking with N26 is not supported yet in this stage | ||
var oldAmf3GppAccessRegContext *models.Amf3GppAccessRegistration | ||
var ue *udm_context.UdmUeContext | ||
|
||
if udm_context.Getself().UdmAmf3gppRegContextExists(ueID) { | ||
ue, _ := udm_context.Getself().UdmUeFindBySupi(ueID) | ||
ue, _ = udm_context.Getself().UdmUeFindBySupi(ueID) | ||
oldAmf3GppAccessRegContext = ue.Amf3GppAccessRegistration | ||
} | ||
|
||
|
@@ -248,13 +250,22 @@ 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 | ||
if !ue.SameAsStoredGUAMI3gpp(*oldAmf3GppAccessRegContext.Guami) { | ||
deregistData := models.DeregistrationData{ | ||
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. modify as below:
|
||
DeregReason: models.DeregistrationReason_SUBSCRIPTION_WITHDRAWN, | ||
AccessType: models.AccessType__3_GPP_ACCESS, | ||
} | ||
|
||
logger.UecmLog.Infof("Send DeregNotify to old AMF GUAMI=%v", oldAmf3GppAccessRegContext.Guami) | ||
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. move this logger into go routine. |
||
go func() { | ||
pd := callback.SendOnDeregistrationNotification(ueID, | ||
oldAmf3GppAccessRegContext.DeregCallbackUri, | ||
deregistData) // Deregistration Notify Triggered | ||
if pd != nil { | ||
logger.UecmLog.Errorf("RegistrationAmf3gppAccess: send DeregNotify fail %v", pd) | ||
} | ||
}() | ||
} | ||
return nil, nil, 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. should be
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. Ok, I will modify it. |
||
} else { | ||
header = make(http.Header) | ||
|
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.