diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-22 07:15:36 +0000 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-27 10:32:42 +0000 |
commit | 6e8d1bb1626996fbaa80b4b0a4322b2bdc27ce6e (patch) | |
tree | 863afb30b80284dbc7184a81ce9d3c12bfbd2f80 /server | |
parent | 3075ae5df98c1f6de73fd33ab5900a81cec3845b (diff) |
config: support reload of AdminDown
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/fsm.go | 4 |
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: |