From f0d05318fe6a28c1f61c46ee3b1d10e93ee36df7 Mon Sep 17 00:00:00 2001 From: tim-ywliu <68043973+tim-ywliu@users.noreply.github.com> Date: Tue, 28 Jun 2022 11:56:20 +0800 Subject: [PATCH] add UEIPAddress S/D and fix SourceInterface in DL PDR PDI for PSA-UPF (#57) --- internal/context/datapath.go | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/internal/context/datapath.go b/internal/context/datapath.go index 34fb9bc8..101ecf2d 100644 --- a/internal/context/datapath.go +++ b/internal/context/datapath.go @@ -460,9 +460,14 @@ func (dataPath *DataPath) ActivateTunnelAndPDR(smContext *SMContext, precedence // TODO: Should delete this after FR5GC-1029 is solved if curDataPathNode.IsAnchorUPF() { - DLPDR.PDI.UEIPAddress = &pfcpType.UEIPAddress{ - V4: true, - Ipv4Address: smContext.PDUAddress.To4(), + DLPDR.PDI = PDI{ + SourceInterface: pfcpType.SourceInterface{InterfaceValue: pfcpType.SourceInterfaceSgiLanN6Lan}, + NetworkInstance: &pfcpType.NetworkInstance{NetworkInstance: smContext.Dnn}, + UEIPAddress: &pfcpType.UEIPAddress{ + V4: true, + Sd: true, + Ipv4Address: smContext.PDUAddress.To4(), + }, } } else { DLPDR.OuterHeaderRemoval = &pfcpType.OuterHeaderRemoval{ @@ -539,19 +544,6 @@ func (dataPath *DataPath) ActivateTunnelAndPDR(smContext *SMContext, precedence } } } - if curDataPathNode.DownLinkTunnel != nil { - if curDataPathNode.DownLinkTunnel.SrcEndPoint == nil { - DNDLPDR := curDataPathNode.DownLinkTunnel.PDR - DNDLPDR.PDI = PDI{ - SourceInterface: pfcpType.SourceInterface{InterfaceValue: pfcpType.SourceInterfaceCore}, - NetworkInstance: &pfcpType.NetworkInstance{NetworkInstance: smContext.Dnn}, - UEIPAddress: &pfcpType.UEIPAddress{ - V4: true, - Ipv4Address: smContext.PDUAddress.To4(), - }, - } - } - } } dataPath.Activated = true