summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
AgeCommit message (Collapse)Author
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>
2015-12-28config: make config/state variable name simpleISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-08server/table: use only one rib for multiple route server clientsISHIDA Wataru
speed up and reduce memory footprint Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-13mrt: use on-wire original update data for mrtFUJITA Tomonori
bgpd parse on-wire original update data to construct BGPMessage object and serialize it. Sometimes the both data is not idential. For example, the original data sets the extended length for attribute even if the length is less than 256. This commit fixes the above issue. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13use the same timestamp for bmp and mrt updatesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-11server: add MsgDst to FsmMsgISHIDA Wataru
will use this later for performance test Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-11server: expose fsmMsgType, fsmMsgISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-09server: move POLICY_DIRECTION_IN processing from peer to fsmFUJITA Tomonori
For parallel processing. Each peer's rx goroutine can process IN policy. Note that RWLock() should be called in looking at policies via grpc too but such operaitons are done in the main goroutine so not called. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-09server: move ProcessMessage to fsm from peerFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-09server: move peerInfo from peer to fsmFUJITA Tomonori
fsm needs it with the later commit. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-09server: call ValidateUpdateMsg() in fsm instead of peerFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-08server: add rfmap to fsm tooFUJITA Tomonori
rfmap is necessary to validate BGP messages. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>