From 87a71be40f37a3d39e56d8452bcf122a6b5ce422 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Thu, 6 Aug 2015 15:29:56 +0900 Subject: server: support to send notification to all peers when shutdown Signed-off-by: FUJITA Tomonori --- server/server.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/server.go') 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 } -- cgit v1.2.3