summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/fsm.go b/server/fsm.go
index ffba35f1..2b287dfb 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -130,13 +130,17 @@ func (fsm *FSM) bgpMessageStateUpdate(MessageType uint8, isIn bool) {
}
func NewFSM(gConf *config.Global, pConf *config.Neighbor) *FSM {
+ adminState := ADMIN_STATE_UP
+ if pConf.NeighborState.AdminDown == true {
+ adminState = ADMIN_STATE_DOWN
+ }
fsm := &FSM{
gConf: gConf,
pConf: pConf,
state: bgp.BGP_FSM_IDLE,
connCh: make(chan net.Conn),
opensentHoldTime: float64(HOLDTIME_OPENSENT),
- adminState: ADMIN_STATE_UP,
+ adminState: adminState,
adminStateCh: make(chan AdminState, 1),
getActiveCh: make(chan struct{}),
}