summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-12-30 01:27:24 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-12-30 01:42:46 +0900
commit30a072030d7a4e003e5026ca772a006298cee949 (patch)
tree2e289ffff45ad0423aebb27243f9720c7e70682b
parent2daccc33d5b1f82c151197e731afd5e2d032aadd (diff)
server: just send global rib once when bmp connection is initialized
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r--server/server.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/server/server.go b/server/server.go
index 20a8eebc..6d0fc060 100644
--- a/server/server.go
+++ b/server/server.go
@@ -336,11 +336,12 @@ func (server *BgpServer) Serve() {
buf, _ := u[0].Serialize()
bmpMsgList = append(bmpMsgList, bmpPeerRoute(bgp.BMP_PEER_TYPE_GLOBAL, false, 0, targetPeer.fsm.peerInfo, p.GetTimestamp().Unix(), buf))
}
- for _, p := range server.globalRib.GetBestPathList(table.GLOBAL_RIB_NAME, server.globalRib.GetRFlist()) {
- u := table.CreateUpdateMsgFromPaths([]*table.Path{p})
- buf, _ := u[0].Serialize()
- bmpMsgList = append(bmpMsgList, bmpPeerRoute(bgp.BMP_PEER_TYPE_GLOBAL, true, 0, p.GetSource(), p.GetTimestamp().Unix(), buf))
- }
+ }
+
+ for _, p := range server.globalRib.GetBestPathList(table.GLOBAL_RIB_NAME, server.globalRib.GetRFlist()) {
+ u := table.CreateUpdateMsgFromPaths([]*table.Path{p})
+ buf, _ := u[0].Serialize()
+ bmpMsgList = append(bmpMsgList, bmpPeerRoute(bgp.BMP_PEER_TYPE_GLOBAL, true, 0, p.GetSource(), p.GetTimestamp().Unix(), buf))
}
m := &broadcastBMPMsg{