summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-06 15:29:56 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-06 15:29:56 +0900
commit87a71be40f37a3d39e56d8452bcf122a6b5ce422 (patch)
tree773fd742441807a4ecc4114c607eab2a9076dd47 /server/server.go
parenta79e962dea57be0904d95be9bf5de39ff24409d1 (diff)
server: support to send notification to all peers when shutdown
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index 6a3962d2..4cabc7b9 100644
--- a/server/server.go
+++ b/server/server.go
@@ -710,6 +710,12 @@ func (server *BgpServer) PeerUpdate(peer config.Neighbor) {
server.updatedPeerCh <- peer
}
+func (server *BgpServer) Shutdown() {
+ for _, p := range server.neighborMap {
+ p.fsm.adminStateCh <- ADMIN_STATE_DOWN
+ }
+}
+
func (server *BgpServer) UpdatePolicy(policy config.RoutingPolicy) {
server.policyUpdateCh <- policy
}