From ef25b574974606572854aed3d8a33293b3d343e9 Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm <max@sdn.clinic> Date: Tue, 3 Jul 2018 16:42:32 +0200 Subject: [PATCH] Copy ClusterList when making a deep copy of a BGPPath. Signed-off-by: Maximilian Wilhelm <max@sdn.clinic> --- route/bgp_path.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/route/bgp_path.go b/route/bgp_path.go index 6b63916b..b9bd1216 100644 --- a/route/bgp_path.go +++ b/route/bgp_path.go @@ -311,6 +311,11 @@ func (b *BGPPath) Copy() *BGPPath { cp.LargeCommunities = make([]types.LargeCommunity, len(cp.LargeCommunities)) copy(cp.LargeCommunities, b.LargeCommunities) + if b.ClusterList != nil { + cp.ClusterList = make([]uint32, len(cp.ClusterList)) + copy(cp.ClusterList, b.ClusterList) + } + return &cp } -- GitLab