summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-08 06:56:39 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-12 21:22:00 -0800
commit4dbfc1bce4c31d637d9bc7aeb94793e5fd1e34e1 (patch)
tree2e27fc1fd594cf3841a8978d9cafaa19cbfc8ccc /server/server.go
parent0ef26666ef8e920d3fa0a4ebb9c3c8fea4e6cb36 (diff)
server: remove adj-out usage in filterpath
Preparation for removing in-memory adj-out. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/server/server.go b/server/server.go
index e97fd7f6..0f113305 100644
--- a/server/server.go
+++ b/server/server.go
@@ -341,16 +341,13 @@ func filterpath(peer *Peer, path, old *table.Path) *table.Path {
}
if ignore {
-
- for _, adv := range peer.adjRibOut.PathList([]bgp.RouteFamily{path.GetRouteFamily()}, false) {
+ if old != nil {
// we advertise a route from ebgp,
// which is the old best. We got the
// new best from ibgp. We don't
// advertise the new best and need to
// withdraw the old.
- if path.GetNlri().String() == adv.GetNlri().String() {
- return adv.Clone(true)
- }
+ return old.Clone(true)
}
log.WithFields(log.Fields{
"Topic": "Peer",