summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 4132f3b1..c6cd01c7 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -207,7 +207,7 @@ func (fsm *FSM) bgpMessageStateUpdate(MessageType uint8, isIn bool) {
func NewFSM(gConf *config.Global, pConf *config.Neighbor, policy *table.RoutingPolicy) *FSM {
adminState := ADMIN_STATE_UP
- if pConf.State.AdminDown {
+ if pConf.Config.AdminDown {
adminState = ADMIN_STATE_DOWN
}
pConf.State.SessionState = config.IntToSessionStateMap[int(bgp.BGP_FSM_IDLE)]
@@ -1288,6 +1288,8 @@ func (h *FSMHandler) changeAdminState(s AdminState) error {
}).Debug("admin state changed")
fsm.adminState = s
+ fsm.pConf.State.AdminDown = !fsm.pConf.State.AdminDown
+ fsm.pConf.Config.AdminDown = !fsm.pConf.Config.AdminDown
switch s {
case ADMIN_STATE_UP: