diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-06-27 16:17:41 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-06-27 16:17:41 +0900 |
commit | be0ebd60ff6be10c915143060962fce22ba9269d (patch) | |
tree | cc479eddb6e905afd6eda7cccbf6844c8e2f2776 /server | |
parent | c5b7496d0bd0ec98360044dfda21ab864df0b9cb (diff) |
fix two-bytes AS translation
We can't use the two-bytes AS translation result by the previous
session. IOW, the peer might become 4bytes AS capable after the
session was down.
fix the regression of
commit 6f644ee1ca1be81e6ec96c8504e34c26b3d1f8a8
Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Tue Jun 28 10:44:07 2016 +0900
fsm: do two-bytes AS translation if didn't sent 4byte cap
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/fsm.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/fsm.go b/server/fsm.go index 401570cd..91ba8e56 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -217,6 +217,8 @@ func (fsm *FSM) StateChange(nextState bgp.FSMState) { case bgp.BGP_FSM_ESTABLISHED: fsm.pConf.Timers.State.Uptime = time.Now().Unix() fsm.pConf.State.EstablishedCount++ + // reset the state set by the previous session + fsm.twoByteAsTrans = false if _, y := fsm.capMap[bgp.BGP_CAP_FOUR_OCTET_AS_NUMBER]; !y { fsm.twoByteAsTrans = true break |