summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-27 16:17:41 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-27 16:17:41 +0900
commitbe0ebd60ff6be10c915143060962fce22ba9269d (patch)
treecc479eddb6e905afd6eda7cccbf6844c8e2f2776 /server/fsm.go
parentc5b7496d0bd0ec98360044dfda21ab864df0b9cb (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/fsm.go')
-rw-r--r--server/fsm.go2
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