summaryrefslogtreecommitdiffhomepage
path: root/server/peer.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-21 10:10:17 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-21 10:10:17 +0900
commit0e64f7c080fafb61dd97023bb25e0c59b53b7556 (patch)
treea473434c09fefa27cd9c4a80018841cd3afcc4f1 /server/peer.go
parenta1a86cd2127cd30c7781563ac8e00257f1214779 (diff)
server: remove peer's getBests method
Use TableManager's getBestPathList Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r--server/peer.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/server/peer.go b/server/peer.go
index ea1d8098..55240cf6 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -124,7 +124,7 @@ func (peer *Peer) getAccepted(rfList []bgp.RouteFamily) []*table.Path {
}
func (peer *Peer) getBestFromLocal() ([]*table.Path, []*table.Path) {
- pathList, filtered := peer.ApplyPolicy(table.POLICY_DIRECTION_EXPORT, filterpath(peer, peer.getBests(peer.localRib)))
+ pathList, filtered := peer.ApplyPolicy(table.POLICY_DIRECTION_EXPORT, filterpath(peer, peer.localRib.GetBestPathList(peer.localRib.GetRFlist())))
if peer.isRouteServerClient() == false {
for _, path := range pathList {
path.UpdatePathAttrs(&peer.gConf, &peer.conf)
@@ -249,16 +249,6 @@ func (peer *Peer) handleBGPmessage(m *bgp.BGPMessage) ([]*table.Path, bool, []*b
return pathList, update, bgpMsgList
}
-func (peer *Peer) getBests(rib *table.TableManager) []*table.Path {
- pathList := []*table.Path{}
- for _, rf := range peer.configuredRFlist() {
- for _, paths := range rib.GetBestPathList(rf) {
- pathList = append(pathList, paths)
- }
- }
- return pathList
-}
-
func (peer *Peer) startFSMHandler(incoming chan *fsmMsg) {
peer.fsm.h = NewFSMHandler(peer.fsm, incoming, peer.outgoing)
}