summaryrefslogtreecommitdiffhomepage
path: root/gobgpd
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-21 12:46:06 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-21 12:46:06 +0900
commit300284ce4aff7a11bbd001da295be5464ecf58cc (patch)
tree5f3f418b1080e76439a3de5857691ea9b26d6d33 /gobgpd
parent4635014cbb1f403d4582698f1b0a23f5a879d5d0 (diff)
move gRPC-related code for REQ_ADD_NEIGHBOR and REQ_DELETE_NEIGHBOR to grpc_server.go
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'gobgpd')
-rw-r--r--gobgpd/main.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go
index 31029635..67a0b2f4 100644
--- a/gobgpd/main.go
+++ b/gobgpd/main.go
@@ -248,17 +248,17 @@ func main() {
c = newConfig
}
- for _, p := range added {
+ for i, p := range added {
log.Infof("Peer %v is added", p.Config.NeighborAddress)
- bgpServer.PeerAdd(p)
+ bgpServer.AddNeighbor(&added[i])
}
- for _, p := range deleted {
+ for i, p := range deleted {
log.Infof("Peer %v is deleted", p.Config.NeighborAddress)
- bgpServer.PeerDelete(p)
+ bgpServer.DeleteNeighbor(&deleted[i])
}
- for _, p := range updated {
+ for i, p := range updated {
log.Infof("Peer %v is updated", p.Config.NeighborAddress)
- u, _ := bgpServer.PeerUpdate(p)
+ u, _ := bgpServer.UpdateNeighbor(&updated[i])
updatePolicy = updatePolicy || u
}