diff options
Diffstat (limited to 'table/message.go')
-rw-r--r-- | table/message.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/table/message.go b/table/message.go index 7c290780..502dbd4c 100644 --- a/table/message.go +++ b/table/message.go @@ -128,14 +128,8 @@ func cloneAttrSlice(attrs []bgp.PathAttributeInterface) []bgp.PathAttributeInter return clonedAttrs } -func CloneAndUpdatePathAttrs(pathList []Path, global *config.Global, peer *config.Neighbor) []Path { - newPathList := make([]Path, 0, len(pathList)) - for _, p := range pathList { - clone := p.Clone(p.IsWithdraw()) - clone.updatePathAttrs(global, peer) - newPathList = append(newPathList, clone) - } - return newPathList +func UpdatePathAttrs(path Path, global *config.Global, peer *config.Neighbor) { + path.updatePathAttrs(global, peer) } func createUpdateMsgFromPath(path Path, msg *bgp.BGPMessage) *bgp.BGPMessage { |