summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-11-22 11:05:37 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-11-22 11:08:14 +0900
commitcf94bda92978911d197b4fe2b33751475e446e60 (patch)
tree366deb265463d9ec43c90b1f3d6408755a8e449e
parent473d39e3822e73241c3bd69bf206e0c1e71e0655 (diff)
server: adminDown operation wrongly resets State.PeerAs
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--server/server.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index 050ab81d..ee497874 100644
--- a/server/server.go
+++ b/server/server.go
@@ -999,6 +999,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) {
if peer.fsm.adminState == ADMIN_STATE_DOWN {
peer.fsm.pConf.State = config.NeighborState{}
peer.fsm.pConf.State.NeighborAddress = peer.fsm.pConf.Config.NeighborAddress
+ peer.fsm.pConf.State.PeerAs = peer.fsm.pConf.Config.PeerAs
peer.fsm.pConf.Timers.State = config.TimersState{}
}
peer.startFSMHandler(server.fsmincomingCh, server.fsmStateCh)