summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
AgeCommit message (Collapse)Author
2016-01-09tools: avoid adding a new option to bgpyang2golang.py and fix gobgp.yangISHIDA Wataru
pyang has an internal flag "multiple_modules" to handle multiple yang modules. use it instead of introducing a new option --augment also, fix warnings and errors in gobgp.yang which were there but not has been detected for a while due to the usage of --augment. by using "multiple_modules" flag, pyang detected them. most notable error is wrong usage of list, which needs a key in its substatement. this patch adds key to some of them, and for others uses leaf-list instead. 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-06rpki: add monitor command supportFUJITA Tomonori
monitor the change of rpki validation results: $ gobgp monitor rpki Signed-off-by: FUJITA Tomonori <fujita.tomonori@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>
2015-12-30server: just send global rib once when bmp connection is initializedISHIDA Wataru
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-26add MOD_PATH APIFUJITA Tomonori
Handle only one route unlike MOD_PATHS API. When the API returns an uuid when a route is created. The uuid can be used to remove the route later. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-25rename ModPath to ModPathsFUJITA Tomonori
ModPath API to modify multiple paths so let's use more an appropriate name. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-25table: refactor handleModPathRequestFUJITA Tomonori
Support the api for modifying single path with uuid. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-21*: add global listen port configurationISHIDA Wataru
if port < 0, gobgpd won't listen on tcp:179 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-18bmp: send post-policy routes when connected to bmpdFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-17rpki: support reset/softreset/enable operationFUJITA Tomonori
gobgp rpki server <ip address> reset|softreset|enable reset: close a tcp conneciton and retry to connect and send ResetQuery softreset: send ResetQuery enable: send SerialQuery Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-17rpki: support multiple roa serversFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-16bmp: support post-policy routing monitoringFUJITA Tomonori
"RouteMonitoringPolicy" option added: 0: pre-policy (by default) 1: post-policy 2: both = [BmpServers] [[BmpServers.BmpServerList]] [BmpServers.BmpServerList.BmpServerConfig] Address = "127.0.0.1" Port = 11019 RouteMonitoringPolicy = 2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-15server: fix softresetout to send withdrawn for only routes in adj-outFUJITA Tomonori
This fixes softresetout to send withdrawn updates for only routes in adj-out. Currently, softreset sends withdrawn updates for ALL routes rejected by export policy. The problem is, even if export policy is configured to rejecte any routes, softreset sends withdrawn updates. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-15policy: don't allow configure/show per-peer policy for non-rs-clientISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-15api: refactor afisafi apiISHIDA Wataru
remove unused fields Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-15server: fix IMPORT POLICY handling for newly added peersFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-15server: avoid as loop check in filterpath() for rs peerFUJITA Tomonori
We don't import as loop path into rs peer's table. So no need to check again. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-15server: add error handling of invalid router-idISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-15server: support Neighbor.Trasnport configuration via grpcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-15server: ensure bmpClient is not nil when BgpServer is runningISHIDA Wataru
when gobgp/server used as a bgp library, current implementation can leave bmpClient nil. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-15server: ensure global config is finished before any other configISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-14server: don't import path including looped as pathFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-12server: handle lots of peers trying to connectFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-10server: fix bug when you add a global config in grpcNaoto Hanaue
Gobgp does not Initialize RoutingPolicy if GlobalConifig is configured via gRPC, this issue causes received route from Peer not added to GlobalRib.
2015-12-10server: fix bug when you add a neighbor config in grpcNaoto Hanaue
Gobpg does not set AfiSafi if NeighborConfig is configured via gRPC, this issue causes error when Gobgp receives route from the Peer. log of following when peer was down ``` DEBU[0009] received Key=192.168.100.2 Topic=Peer data=&{Header:{Marker:[] Len:19 Type:4} Body:0xe17ff0} WARN[0010] malformed BGP update message Key=192.168.100.2 Topic=Peer error=Address-family rf 65537 not avalible for session WARN[0010] sent notification Data=&{Header:{Marker:[] Len:21 Type:3} Body:0xc8200117a0} Key=192.168.100.2 State=BGP_FSM_ESTABLISHED Topic=Peer INFO[0010] Peer Down Key=192.168.100.2 Reason=Peer closed the session State=BGP_FSM_ESTABLISHED Topic=Peer DEBU[0010] state changed Key=192.168.100.2 Topic=Peer new=BGP_FSM_IDLE old=BGP_FSM_ESTABLISHED ```
2015-12-09server: use ID() for path's Filter and Filtered methods instead of TableID()FUJITA Tomonori
Needs to use ID() for path's Filter and Filtered methods instead of TableID(). We don't hit any bugs because: - With a RS client, both methods returns the same. - No IN POLICY support for non RS clients Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08table: remove useless table owner memberFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08server: avoid sending routes with unconfigured addres familyFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@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-12-06api/cli: show all longer prefixes with longer-prefixes optionISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-04api/cli: support showing longer-prefixISHIDA Wataru
$ gobgp global rib Network Next Hop AS_PATH Age Attrs *> 10.0.0.0/24 0.0.0.0 00:00:01 [{Origin: ?}] $ gobgp global rib 10.0.0.0/20 Network not in table $ gobgp global rib 10.0.0.0/20 longer-prefix Network Next Hop AS_PATH Age Attrs *> 10.0.0.0/24 0.0.0.0 00:00:01 [{Origin: ?}] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-02make adj-rib implementation more clear and efficientISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-02server: fix show rib with host addressFUJITA Tomonori
With this fix, the RPC API works like the following: $ gobgp global rib Network Next Hop AS_PATH Age Attrs *> 210.173.160.0/19 210.173.172.65 65001 00:00:41 [{Origin: i}] $ gobgp global rib 210.173.176.1 Network Next Hop AS_PATH Age Attrs *> 210.173.160.0/19 210.173.172.65 65001 00:01:17 [{Origin: i}] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-02cli: speed up showing specific routes from global/local ribISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-02api/server: refine GetRib APIISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-27server: fix dropPeerAllRoutes() to handle rfFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-23rpki: grpc supportFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13bmp: use on-wire original update dataFUJITA 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-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-13server: fix bmp and mrt updatesFUJITA Tomonori
Always must send updates to them. 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-12mrt: support reset/rotate commandsFUJITA Tomonori
$ gobgp mrt update reset create a new file or reopen the existing file and continue to write update messages to it. $ gobgp mrt update <filename> rename the current logging file to <filename> and truncate the logging file and continue to write update messages to it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-12server: introduce watcher frameworkFUJITA Tomonori
rewrite mrt to use it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@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>