Skip to content

Commit 1b7e375

Browse files
committed
chore: update HasNRDCSupport to NrdcIndicator
1 parent 410f909 commit 1b7e375

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

internal/context/ngap_handler.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ func HandlePDUSessionResourceSetupResponseTransfer(b []byte, ctx *SMContext) err
5252
var DCQosFlowPerTNLInformationItem ngapType.QosFlowPerTNLInformationItem
5353
DCQosFlowPerTNLInformation := resourceSetupResponseTransfer.AdditionalDLQosFlowPerTNLInformation
5454
if DCQosFlowPerTNLInformation != nil && len(DCQosFlowPerTNLInformation.List) > 0 {
55-
ctx.HasNRDCSupport = true
55+
ctx.NrdcIndicator = true
5656
DCQosFlowPerTNLInformationItem = DCQosFlowPerTNLInformation.List[0]
5757
}
5858

5959
if QosFlowPerTNLInformation.UPTransportLayerInformation.Present !=
6060
ngapType.UPTransportLayerInformationPresentGTPTunnel {
6161
return errors.New("resourceSetupResponseTransfer.QosFlowPerTNLInformation.UPTransportLayerInformation.Present")
6262
}
63-
if ctx.HasNRDCSupport && DCQosFlowPerTNLInformationItem.QosFlowPerTNLInformation.UPTransportLayerInformation.Present !=
63+
if ctx.NrdcIndicator && DCQosFlowPerTNLInformationItem.QosFlowPerTNLInformation.UPTransportLayerInformation.Present !=
6464
ngapType.UPTransportLayerInformationPresentGTPTunnel {
6565
return errors.New(
6666
"resourceSetupResponseTransfer.AdditionalQosFlowPerTNLInformation." +
@@ -69,14 +69,14 @@ func HandlePDUSessionResourceSetupResponseTransfer(b []byte, ctx *SMContext) err
6969

7070
GTPTunnel := QosFlowPerTNLInformation.UPTransportLayerInformation.GTPTunnel
7171
DCGTPTunnel := &ngapType.GTPTunnel{}
72-
if ctx.HasNRDCSupport {
72+
if ctx.NrdcIndicator {
7373
DCGTPTunnel = DCQosFlowPerTNLInformationItem.QosFlowPerTNLInformation.UPTransportLayerInformation.GTPTunnel
7474
}
7575

7676
ctx.Tunnel.UpdateANInformation(
7777
GTPTunnel.TransportLayerAddress.Value.Bytes,
7878
binary.BigEndian.Uint32(GTPTunnel.GTPTEID.Value))
79-
if ctx.HasNRDCSupport {
79+
if ctx.NrdcIndicator {
8080
ctx.DCTunnel.UpdateANInformation(
8181
DCGTPTunnel.TransportLayerAddress.Value.Bytes,
8282
binary.BigEndian.Uint32(DCGTPTunnel.GTPTEID.Value))

internal/context/sm_context.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ type SMContext struct {
127127
LocalDLTeid uint32
128128
LocalULTeidForSplitPDUSession uint32
129129
LocalDLTeidForSplitPDUSession uint32
130-
HasNRDCSupport bool
130+
NrdcIndicator bool
131131

132132
UpCnxState models.UpCnxState
133133

@@ -363,7 +363,7 @@ func NewSMContext(id string, pduSessID int32) *SMContext {
363363
return nil
364364
}
365365

366-
smContext.HasNRDCSupport = false
366+
smContext.NrdcIndicator = false
367367

368368
return smContext
369369
}
@@ -415,7 +415,7 @@ func RemoveSMContext(ref string) {
415415
ReleaseTEID(smContext.LocalULTeidForSplitPDUSession)
416416
ReleaseTEID(smContext.LocalDLTeidForSplitPDUSession)
417417

418-
smContext.HasNRDCSupport = false
418+
smContext.NrdcIndicator = false
419419

420420
smContextPool.Delete(ref)
421421
canonicalRef.Delete(canonicalName(smContext.Supi, smContext.PDUSessionID))

internal/sbi/processor/pdu_session.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ func (p *Processor) HandlePDUSessionSMContextUpdate(
598598
if err = smf_context.
599599
HandlePDUSessionResourceSetupResponseTransfer(body.BinaryDataN2SmInformation, smContext); err != nil {
600600
smContext.Log.Errorf("Handle PDUSessionResourceSetupResponseTransfer failed: %+v", err)
601-
} else if smContext.HasNRDCSupport {
601+
} else if smContext.NrdcIndicator {
602602
for _, pdr := range pdrList {
603603
// Remove all PDRs except the default PDR
604604
if pdr.Precedence != 255 {
@@ -1167,7 +1167,7 @@ func releaseSession(smContext *smf_context.SMContext) smf_context.PFCPSessionRes
11671167
return res.Status
11681168
}
11691169
}
1170-
if !smContext.HasNRDCSupport {
1170+
if !smContext.NrdcIndicator {
11711171
return smf_context.SessionReleaseSuccess
11721172
}
11731173

0 commit comments

Comments
 (0)