summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-02-01 22:20:56 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-02-01 22:20:56 +0900
commite847d3733d85cf5ba10dd4a04a0614d85e6b3647 (patch)
treee4c4d9be6b0233c813d4881ab209063a52a8c2f3 /server
parentaf61e847ce5199c292570e13cc695ed164cb8421 (diff)
server: fix dynamic neighbor crash
close #1575 if L854 is executed before L924, we hit a crash because of closing a channel twice. This fixes the isseu but We had better to refactor the code to delete a peer. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/server.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index 0a39674d..48986f72 100644
--- a/server/server.go
+++ b/server/server.go
@@ -853,6 +853,8 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) {
peer.stopPeerRestarting()
go peer.stopFSM()
delete(server.neighborMap, peer.fsm.pConf.State.NeighborAddress)
+ server.broadcastPeerState(peer, oldState)
+ return
}
} else if peer.fsm.pConf.GracefulRestart.State.PeerRestarting && nextState == bgp.BGP_FSM_IDLE {
if peer.fsm.pConf.GracefulRestart.State.LongLivedEnabled {