summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go
index 3471ee7e..3a3b70fe 100644
--- a/server/server.go
+++ b/server/server.go
@@ -910,8 +910,8 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) []*SenderMsg {
switch e.MsgType {
case FSM_MSG_STATE_CHANGE:
nextState := e.MsgData.(bgp.FSMState)
- oldState := bgp.FSMState(peer.conf.State.SessionState)
- peer.conf.State.SessionState = uint32(nextState)
+ oldState := bgp.FSMState(peer.conf.State.SessionState.ToInt())
+ peer.conf.State.SessionState = peer.conf.State.SessionState.FromInt(int(nextState))
peer.fsm.StateChange(nextState)
if oldState == bgp.BGP_FSM_ESTABLISHED {