diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-25 07:16:13 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-25 07:16:13 -0800 |
commit | 4ff5a68f964a2f85956374b5b95e03f5a19af4da (patch) | |
tree | 33e1d0f810cae15735b24ece5686dad24460b9ec /server/fsm.go | |
parent | 02f33490e74f7aa9c0680067934da3088cacf754 (diff) |
server: update state and counter properly
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r-- | server/fsm.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/fsm.go b/server/fsm.go index 7cdd866b..849d8169 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -42,7 +42,12 @@ type FSM struct { } func (fsm *FSM) bgpMessageStateUpdate(MessageType uint8, isIn bool) { - state := fsm.peerConfig.BgpNeighborCommonState + state := &fsm.peerConfig.BgpNeighborCommonState + if isIn { + state.TotalIn++ + } else { + state.TotalOut++ + } switch MessageType { case bgp.BGP_MSG_OPEN: if isIn { |