summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
AgeCommit message (Collapse)Author
2016-05-10server: log notification error codeFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-10server: don't modify admin-down configISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-09server: fix to send more appropriate notification code/subcodeISHIDA Wataru
admin-down : 6/2 peer-as/neighbor-address : 6/3 other : 6/6 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-09server: ignore stale fsm messagesISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-09server: don't block select loop by Sleep(), use Timer insteadISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-06server: don't apply in policy to EOR pathFUJITA Tomonori
EOR path doesn't have theh complete information so applying a policy to EOR path leads to crash. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-04-27config: support reload of AdminDownISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-26move NeighborPortNumber config to transport.ConfigFUJITA Tomonori
More appropriate. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-04-21config: simplify config structuresISHIDA Wataru
stop generating self-contained leafref fields in openconfig model. (e.g. bgp:neighbor/bgp:neighbor-address ) Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-21fsm: improve fsm state transition logISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-20fsm: improve debug messageISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-19peer: remove redundant config structsISHIDA Wataru
preparation for #597 stop messing up where neighbor configuration is stored just keep it in each peers' fsm struct Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-19fsm: improve log message when prefix-limit reachedISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-19server: fix comment typoShawn Smith
2016-04-11Add neighbor-port-number to bgp neighbor configYi Tseng
Allow user to setup neighbor BGP TCP port (Default is 179)
2016-04-10server: support prefix-limitISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-10server: serialize in fsm send loopISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-10fsm: delegate 2byte as handling to fsm send goroutineISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-03-31move packet/*.go to packet/bgp/*.go for Go's conventionFUJITA Tomonori
Later, we move non-bgp protocol stuff like mrt under their own direcotries. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-15Revert "fsm: remove redundant connection close"FUJITA Tomonori
when hold timer expires, established() goroutine exits so even if tx() goroutine writes to errorCh, nobody closes the connection. The, rx() goroutine doesn't finish, so gobgpd hits panic(). This reverts commit 38bd31856b5eff046a4874e83b53cb7d3e45cdaf. Conflicts: server/fsm.go
2016-03-12fsm: support active connection with md5 and bindingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-03-07server: make rx goroutine reading from socket never sleepFUJITA Tomonori
Currently, the rx goroutine reading from socket (recvMessageloop funciton) sleeps if msgCh is full. The problem is that if the rx goroutine stops reading from a socket, keepalives are ignored, the holdtime on gobgp expires even if a peer properly sends keepalives. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-07server: clean up recvMessageWithErrorFUJITA Tomonori
better way to avoid blocked on channel. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-07server: recvMessageWithError avoid blocked due to msgChFUJITA Tomonori
Preparation for make recvMessageWithError() avoid being blocked. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-07server: make sure recvMessageWithError() not blocked due to errorChFUJITA Tomonori
probably doesn't happen but be cautious. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-02fsm: fix min keepalive interval to 1sec from 1nsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-29config/server: support per-peer asnISHIDA Wataru
you can override `global.config.as` by `neighbor.config.local-as` Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-29server: support active connection with md5 protectionISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-19fsm: remove MsgDstFUJITA Tomonori
No user any more. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-10server: support graceful-restart helper-speaker behaviorISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-10fsm: support negotiation of graceful restart capabilityISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-10server: reflect graceful restart configuration in a sending open messageISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-04server: make initial active connect fasterISHIDA Wataru
give random.Intn() MIN_CONNECT_RETRY(10s) instead of connect-retry (120s by default). Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-29fsm: remove FSM.confedCheckISHIDA Wataru
no need to make this FSM's field. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-29server: add negotiated holdtime/keepalive-interval in api structISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-29server: remove a redundant FSM negotiatedHoldtime fieldISHIDA Wataru
use config.TimerState struct instead Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-25config: add openconfig identity structs in bgp_configs.goISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-25fsm: add type FsmStateReason to track reason of state transitionISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-25fsm: remove redundant connection closeISHIDA Wataru
we don't need to close here because we are signaling through h.errorCh Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-25server: log received notificationISHIDA Wataru
fsm doesn't pass notification messages to peer since 5c835fcc4fa03e74dd03bf7661b65771bf539adc log received notifications in fsmhandler. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-16policy: introduce policy option infraISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-13server: fix fixed timeout for writeFUJITA Tomonori
using 30 secs is a bad idea. Let's use negotiated holdtime instead. But I think that we should not use timeout for write. when a timeout for write expires, we shuld just check: a) if the conneciton is still valid b) a peer is not de-configured a) nor b) is not the case, we should try write again. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-12server: don't assume the existence of multiprotocol capabilityISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-09config: refactor config structureISHIDA Wataru
- change config variable name to chaincase from camelcase - remove unnecessary wrapper structs which only contain one slice field Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-06server: fix storing received open msgISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-04server: don't put keepalive & notification to incoming chISHIDA Wataru
these msgs are garbage for server's main loop and just wasting channel buffer. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-04server: introduce fastpath for fsm state changeISHIDA Wataru
for robust fsm handling Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-04server: handle open message only in fsmISHIDA Wataru
we don't need to spread this handling to peer.go and server.go Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-04server: randomize trigger of active connectISHIDA Wataru
fix connectivity issue when both bgpd is gobgpd Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-29config: use viper and support multiple configuration formatsISHIDA Wataru
// toml by default $ gobgpd -f gobgpd.toml // use -t to change configuration type $ gobgpd -t yaml -f gobgpd.yaml Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>