diff --git a/gmm/handler.go b/gmm/handler.go index bd6dd444..d8f48719 100644 --- a/gmm/handler.go +++ b/gmm/handler.go @@ -626,6 +626,18 @@ func HandleRegistrationRequest(ctx ctxt.Context, ue *context.AmfUe, anType model ue.Location = ue.RanUe[anType].Location ue.Tai = ue.RanUe[anType].Tai + switch anType { + case models.AccessType__3_GPP_ACCESS: + switch { + case ue.Location.NrLocation != nil: + ue.RatType = models.RatType_NR + case ue.Location.EutraLocation != nil: + ue.RatType = models.RatType_EUTRA + } + case models.AccessType_NON_3_GPP_ACCESS: + ue.RatType = models.RatType_WLAN + } + // Check TAI taiList := make([]models.Tai, len(amfSelf.SupportTaiLists)) copy(taiList, amfSelf.SupportTaiLists) diff --git a/producer/ue_context.go b/producer/ue_context.go index 9ccd57d3..edb6b26a 100644 --- a/producer/ue_context.go +++ b/producer/ue_context.go @@ -134,7 +134,9 @@ func CreateUEContextProcedure(ueContextID string, createUeContextRequest models. ue.UdmGroupId = ueContextCreateData.UeContext.UdmGroupId ue.AusfGroupId = ueContextCreateData.UeContext.AusfGroupId // ueContextCreateData.UeContext.HpcfId - ue.RatType = ueContextCreateData.UeContext.RestrictedRatList[0] // minItem = -1 + // RestrictedRatList contains RAT types the UE cannot use, so it must + // not be copied into ue.RatType. RatType is set from the access type + // during HandleRegistrationRequest (gmm/handler.go). // ueContextCreateData.UeContext.ForbiddenAreaList // ueContextCreateData.UeContext.ServiceAreaRestriction // ueContextCreateData.UeContext.RestrictedCoreNwTypeList