Skip to content

Commit

Permalink
update instead of create
Browse files Browse the repository at this point in the history
  • Loading branch information
louisroyer committed Sep 5, 2024
1 parent dc2a1f2 commit 683837d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pfcp/far_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func (m *FARMap) Update(far api.FARInterface) error {
if far.ApplyAction() != nil {
m.farmap[id].SetApplyAction(far.ApplyAction())
}
// XXX: update fields in forwarding paramaters instead of replacing
if fp, err := far.ForwardingParameters(); err == nil {
m.farmap[id].SetForwardingParameters(fp)
}
Expand Down Expand Up @@ -207,7 +208,7 @@ func NewFARMapUpdate(fars []*ie.IE) (*FARMap, error, uint8, uint16) {
var iefp *ie.IE = nil
fp, err := far.UpdateForwardingParameters()
if err == nil {
iefp = ie.NewForwardingParameters(fp...)
iefp = ie.NewUpdateForwardingParameters(fp...)
}
f.Update(NewFAR(ie.NewFARID(id), ieaa, iefp))
}
Expand Down

0 comments on commit 683837d

Please sign in to comment.