From 171d7e9beb76d126874e694bbeed556aed535a64 Mon Sep 17 00:00:00 2001 From: ShouheiNishi <96609867+ShouheiNishi@users.noreply.github.com> Date: Thu, 24 Aug 2023 00:16:21 +0900 Subject: [PATCH] Issue435 reproduce (#437) * Alphabetic SD test * Case mismatch SD test --- .../RegistrationProcedure.go | 12 ++++++------ test/ngapTestpacket/build.go | 2 +- test/ngsetup_test.go | 10 +++++----- test/registration_test.go | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/consumerTestdata/UDR/TestRegistrationProcedure/RegistrationProcedure.go b/test/consumerTestdata/UDR/TestRegistrationProcedure/RegistrationProcedure.go index 4851b94f..2c34a4ba 100644 --- a/test/consumerTestdata/UDR/TestRegistrationProcedure/RegistrationProcedure.go +++ b/test/consumerTestdata/UDR/TestRegistrationProcedure/RegistrationProcedure.go @@ -23,7 +23,7 @@ func init() { DefaultSingleNssais: []models.Snssai{ { Sst: 1, - Sd: "010203", + Sd: "FEDCBA", }, { Sst: 1, @@ -33,7 +33,7 @@ func init() { SingleNssais: []models.Snssai{ { Sst: 1, - Sd: "010203", + Sd: "FEDCBA", }, { Sst: 1, @@ -49,7 +49,7 @@ func init() { TestSmfSelDataTable[FREE5GC_CASE] = models.SmfSelectionSubscriptionData{ SubscribedSnssaiInfos: map[string]models.SnssaiInfo{ - "01010203": { // sst:1, sd:010203 + "01FEDCBA": { // sst:1, sd:FEDCBA DnnInfos: []models.DnnInfo{ { Dnn: "internet", @@ -74,9 +74,9 @@ func init() { TestSmPolicyDataTable[FREE5GC_CASE] = models.SmPolicyData{ SmPolicySnssaiData: map[string]models.SmPolicySnssaiData{ - "01010203": { + "01FEDCBA": { Snssai: &models.Snssai{ - Sd: "010203", + Sd: "FEDCBA", Sst: 1, }, SmPolicyDnnData: map[string]models.SmPolicyDnnData{ @@ -103,7 +103,7 @@ func init() { { SingleNssai: &models.Snssai{ Sst: 1, - Sd: "010203", + Sd: "FEDCBA", }, DnnConfigurations: map[string]models.DnnConfiguration{ "internet": { diff --git a/test/ngapTestpacket/build.go b/test/ngapTestpacket/build.go index 601e8ac9..1d7e2ac2 100644 --- a/test/ngapTestpacket/build.go +++ b/test/ngapTestpacket/build.go @@ -90,7 +90,7 @@ func BuildNGSetupRequest() (pdu ngapType.NGAPPDU) { sliceSupportItem.SNSSAI.SST.Value = aper.OctetString("\x01") // optional sliceSupportItem.SNSSAI.SD = new(ngapType.SD) - sliceSupportItem.SNSSAI.SD.Value = aper.OctetString("\x01\x02\x03") + sliceSupportItem.SNSSAI.SD.Value = aper.OctetString("\xfe\xdc\xba") sliceSupportList.List = append(sliceSupportList.List, sliceSupportItem) diff --git a/test/ngsetup_test.go b/test/ngsetup_test.go index 60fc56f9..7fb2562a 100644 --- a/test/ngsetup_test.go +++ b/test/ngsetup_test.go @@ -323,7 +323,7 @@ func amfConfig(testID string) error { }, SNssaiList: []models.Snssai{{ Sst: 1, - Sd: "010203", + Sd: "fedcba", }, { Sst: 1, Sd: "112233", @@ -445,7 +445,7 @@ func smfConfig(testID string) error { SNssaiInfo: []*smf_factory.SnssaiInfoItem{{ SNssai: &models.Snssai{ Sst: 1, - Sd: "010203", + Sd: "fedcba", }, DnnInfos: []*smf_factory.SnssaiDnnInfoItem{{ Dnn: "internet", @@ -494,7 +494,7 @@ func smfConfig(testID string) error { SNssaiInfos: []*smf_factory.SnssaiUpfInfoItem{{ SNssai: &models.Snssai{ Sst: 1, - Sd: "010203", + Sd: "fedcba", }, DnnUpfInfoList: []*smf_factory.DnnUpfInfoItem{{ Dnn: "internet", @@ -842,7 +842,7 @@ func nssfConfig() error { }, SupportedSnssaiList: []models.Snssai{{ Sst: 1, - Sd: "010203", + Sd: "fedcba", }, { Sst: 1, Sd: "112233", @@ -915,7 +915,7 @@ func nssfConfig() error { }, { Snssai: &models.Snssai{ Sst: 1, - Sd: "010203", + Sd: "fedcba", }, NsiInformationList: []models.NsiInformation{{ NrfId: "http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances", diff --git a/test/registration_test.go b/test/registration_test.go index e07ed3a8..eeb1c29c 100644 --- a/test/registration_test.go +++ b/test/registration_test.go @@ -206,7 +206,7 @@ func TestRegistration(t *testing.T) { sNssai := models.Snssai{ Sst: 1, - Sd: "010203", + Sd: "fedcba", } pdu = nasTestpacket.GetUlNasTransport_PduSessionEstablishmentRequest(10, nasMessage.ULNASTransportRequestTypeInitialRequest, "internet", &sNssai) pdu, err = test.EncodeNasPduWithSecurity(ue, pdu, nas.SecurityHeaderTypeIntegrityProtectedAndCiphered, true, false)