summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-11-07 17:04:08 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-11-08 05:05:36 -0800
commitd53a5d11d9f3b0ee762a0510ff6608e69ed595ff (patch)
treee108b9cf26a3d65198a6ac5cf0c8f669194eccaf /server
parent2db916a4d3e5783ae3ac68bb436722fea0bbe925 (diff)
table: fix local-pref handling for external peer
remove a local-pref path attribute when peer is external and not a confederation member. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/server/peer.go b/server/peer.go
index 95d3839e..cc695859 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -76,15 +76,7 @@ func NewPeer(g config.Global, conf config.Neighbor, loc *table.TableManager) *Pe
}
peer.adjRib = table.NewAdjRib(peer.configuredRFlist())
peer.fsm = NewFSM(&g, &conf)
- if conf.NeighborConfig.PeerAs != g.GlobalConfig.As {
- for _, member := range g.Confederation.ConfederationConfig.MemberAs {
- if member == conf.NeighborConfig.PeerAs {
- peer.isConfederationMember = true
- break
- }
- }
- }
-
+ peer.isConfederationMember = config.IsConfederationMember(&g, &conf)
return peer
}