diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-02-01 22:20:56 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-02-01 22:20:56 +0900 |
commit | e847d3733d85cf5ba10dd4a04a0614d85e6b3647 (patch) | |
tree | e4c4d9be6b0233c813d4881ab209063a52a8c2f3 /server | |
parent | af61e847ce5199c292570e13cc695ed164cb8421 (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.go | 2 |
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 { |