Commit 067a8cab authored by 吴洲洋's avatar 吴洲洋

update delete session

parent 47f4c192
......@@ -18,7 +18,8 @@ import (
var (
ueUpTeid map[string]uint32
ueSeid map[uint64]string
ueToSeid map[string]uint64
SeidToUe map[uint64]string
upTeid uint32
......@@ -37,7 +38,8 @@ func init() {
ueUpTeid = make(map[string]uint32, LENGTH)
smfUpf = make(map[uint64]uint64, LENGTH)
upfSmf = make(map[uint64]uint64, LENGTH)
ueSeid = make(map[uint64]string, LENGTH)
SeidToUe = make(map[uint64]string, LENGTH)
ueToSeid = make(map[string]uint64, LENGTH)
VppChannel = make(chan *model.VppMessage, 10)
seid = 0
}
......@@ -161,6 +163,14 @@ func handleSessionEstablishmentMsg(config *conf.Config, msgContent message.Messa
ueUpTeid[establishment.UEIP] = upTeid
}
if ueToSeid[establishment.UEIP] == 0 {
ueToSeid[establishment.UEIP] = establishment.CpSeID
}
if SeidToUe[establishment.CpSeID] == "" {
SeidToUe[establishment.CpSeID] = establishment.UEIP
}
req := &upf.UpfSseReq{
CpSeid: establishment.CpSeID,
Pdr: upf.BuptPfcpPdr{
......@@ -284,11 +294,11 @@ func handleSessionModificationMsg(config *conf.Config, msgContent message.Messag
} else {
log.Info("-------------------------接收到修改下行请求--------------------------------")
ueip := ueSeid[modificationUpdate.CpSeID]
smfSeID := upfSmf[modificationUpdate.CpSeID]
ueip := SeidToUe[smfSeID]
log.Info("Seid %d", smfSeID)
log.Info("farid: %d", modificationUpdate.FarID)
log.Info("ueip %s", modificationUpdate.UeIP)
log.Info("ueip %s", ueip)
log.Info("TEID 0x%x", modificationUpdate.TeID)
log.Info("GNB GTPu: %s", modificationUpdate.GnbIP)
......@@ -349,10 +359,13 @@ func handleSessionDeletionMsg(msgContent message.Message) []byte {
// Data passed to vpp
fseid, _ := msg.CPFSeid.FSEID()
ue := fseid.IPv4Address.String()
id := ueToSeid[ue]
log.Info("get message F-SEID:%d", fseid.SEID)
log.Info("UE IP:%s", ue)
req := &upf.UpfSsdReq{
CpSeid: fseid.SEID,
CpSeid: id,
}
reply := &upf.UpfSsdReqReply{}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment