diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/server.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index d86e51df..f1aafe94 100644 --- a/server/server.go +++ b/server/server.go @@ -988,7 +988,17 @@ func (server *BgpServer) propagateUpdateToNeighbors(source *Peer, newPath *table return family }() if targetPeer.isAddPathSendEnabled(f) { - bestList = []*table.Path{newPath} + if newPath.IsWithdraw { + bestList = func() []*table.Path { + l := make([]*table.Path, 0, len(dsts)) + for _, d := range dsts { + l = append(l, d.GetWithdrawnPath()...) + } + return l + }() + } else { + bestList = []*table.Path{newPath} + } oldList = nil } else if targetPeer.isRouteServerClient() { bestList, oldList, _ = dstsToPaths(targetPeer.TableID(), targetPeer.AS(), dsts) |