348 Commits
Author SHA1 Message Date
ISHIDA WataruandFUJITA Tomonori 5ceeb3da2d cli: speed up showing specific routes from global/local rib
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-02 08:53:04 +09:00
ISHIDA WataruandFUJITA Tomonori ff26d4e93b api/server: refine GetRib API
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-02 08:53:04 +09:00
FUJITA Tomonori 13b98e40b5 server: fix dropPeerAllRoutes() to handle rf
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-27 19:06:12 -08:00
FUJITA Tomonori a1602f3a25 rpki: grpc support
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-23 23:00:18 -08:00
FUJITA Tomonori f6897fd47f rpki: fix IPv4-mapped addresss handling
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-18 21:07:45 -08:00
FUJITA Tomonori 072a0b07bd bmp: use on-wire original update data
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 <[email protected]>
2015-11-13 13:05:24 +09:00
FUJITA Tomonori 12ae1b784d mrt: use on-wire original update data for mrt
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 <[email protected]>
2015-11-13 12:42:30 +09:00
FUJITA Tomonori 515abe2880 server: fix bmp and mrt updates
Always must send updates to them.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-13 10:53:40 +09:00
FUJITA Tomonori 59f18c15ca use the same timestamp for bmp and mrt updates
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-13 10:50:26 +09:00
FUJITA Tomonori 95e7cc7308 mrt: support reset/rotate commands
$ 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 <[email protected]>
2015-11-12 15:01:12 +09:00
FUJITA Tomonori 180d68f88f server: introduce watcher framework
rewrite mrt to use it.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-12 15:01:12 +09:00
ISHIDA Wataru 34bd365bb4 test: add performance_test
currently only many-peer-connecting test (equivalent to hoofprints test T1)
is implemented.

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-11-11 00:46:50 +09:00
ISHIDA Wataru 318b3af291 server: add MsgDst to FsmMsg
will use this later for performance test

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-11-11 00:31:35 +09:00
ISHIDA Wataru 403ae3580b server: expose fsmMsgType, fsmMsg
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-11-11 00:31:32 +09:00
FUJITA Tomonori 84d73c1b45 server: move POLICY_DIRECTION_IN processing from peer to fsm
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 <[email protected]>
2015-11-09 14:14:16 -08:00
FUJITA Tomonori 431ce6b171 server: move ProcessMessage to fsm from peer
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-09 05:46:36 -08:00
FUJITA Tomonori efcbc131df server: move peerInfo from peer to fsm
fsm needs it with the later commit.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-09 05:32:38 -08:00
FUJITA Tomonori d621be0374 server: call ValidateUpdateMsg() in fsm instead of peer
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-09 05:07:37 -08:00
FUJITA Tomonori 344e575502 server: add rfmap to fsm too
rfmap is necessary to validate BGP messages.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-08 06:31:49 -08:00
ISHIDA WataruandFUJITA Tomonori d53a5d11d9 table: fix local-pref handling for external peer
remove a local-pref path attribute when peer is external and
not a confederation member.

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-11-08 05:05:36 -08:00
FUJITA Tomonori d553894871 server: kill unncessary rfMap update
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-06 00:15:06 -08:00
YujiOshima 1cc19fd280 cmd/api: get peer remote router id not neighbor address
Signed-off-by: YujiOshima <[email protected]>
2015-11-06 10:05:52 +09:00
ISHIDA Wataru 5cb6eff335 server: fix lacking capability fields
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-11-02 13:47:00 +09:00
ISHIDA WataruandFUJITA Tomonori e3185194bb server: enable to start without configuration file
add grpc api to configure global as/router-id

$ gobgp global as 65000 router-id 10.0.0.1

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-30 15:05:09 +09:00
Yuji OshimaandFUJITA Tomonori b780fed28a api: confirm api.Peer to openconfig and add ModPeer api
Signed-off-by: YujiOshima <[email protected]>
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-29 17:26:01 +09:00
Eiichiro Watanabe 645ce47b98 Add examples for rpki 2015-10-28 18:01:49 +09:00
FUJITA Tomonori d6360e2b32 server: fix RPKI verification to handle ASPATH ATTR TYPE properly
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-27 23:10:55 +09:00
FUJITA Tomonori c66b596122 server: fix radix key bug in rpki test
also clean up functions to create a radix key.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-27 09:34:32 +09:00
FUJITA Tomonori ed5026413c server: fix rpki to handle roa with multiple ASes
A single prefix in ROA could have multiple ASes.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-26 20:20:10 +09:00
FUJITA Tomonori 46231a7201 server: fix ROUTE_REFRESH handling
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 18:55:53 +09:00
FUJITA Tomonori 95619d0690 server: apply policy before sending for ROUTE_REFRESH
Rather than just sending routes in the AdjOut, apply policies to
routes in the Loc and sends them.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 10:21:54 +09:00
FUJITA Tomonori 0e64f7c080 server: remove peer's getBests method
Use TableManager's getBestPathList

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 10:10:17 +09:00
FUJITA Tomonori a1a86cd212 table: make AdjRib API take slice of RouteFamily
Make the code simpler

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 09:50:39 +09:00
FUJITA Tomonori ec8c83d950 server: make getBestFromLocal peer's method
Will be used to handle ROUTE_REFRESH.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 09:10:39 +09:00
FUJITA Tomonori 6be9023454 server: avoid updating peer's LocalAddress unnecessary
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 09:00:06 +09:00
FUJITA Tomonori cbd955e97e server: avoid generating rflist from config
Use saved one in TableManager

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 05:52:04 +09:00
FUJITA Tomonori 81253df14f server: set globalRib to non routeserver peer's LocalRib
TODO: fix SetDefaultPolicy()

In the case of GlobalRib, even if the default policy is set for
GlobalRib, the default policy of a peer (not configured) could
overwrite the former.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 05:51:41 +09:00
FUJITA Tomonori bbc852d613 table: store the list of route family in TableManager
Will be used later to avoid generate the list of route family every
time.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-21 05:50:54 +09:00
FUJITA Tomonori e61a344e69 server: kill unnecessary code
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-10-20 20:55:49 +09:00
ISHIDA Wataru e0a0fd792d server: properly handle invalid policy config
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 16:05:41 +09:00
ISHIDA WataruandFUJITA Tomonori f634b50357 api: support policy assignment modification via grpc
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori 9362bba919 api: support policy modification via grpc
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori 95e68a8d88 api/cli: refactor api to retrieve policy
make it similar to other policy api

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori a88e0b5592 api: support statement modification via grpc
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori 7cb50ce1cf api/cli: add api to retrieve statements and support showing them via cli
$ gobgp policy statement
$ gobgp policy statement st0

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori 29f9682ecb server: remove stale api related code
use api ModDefinedSet() to modify defined-set

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori 16234ccbb3 cli: support defined-set configuration
prefix-set modification
gobgp policy prefix add p0 10.0.0.0/24 10..15
neighbor-set modification
gobgp policy neighbor add n0 10.0.0.1
as-path-set modification
gobgp policy aspath add a0 '^100_200_300$'
community-set modification
gobgp policy community add c0 100:100
ext-community-set modification
gobgp policy community add e0 rt:100:100

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori 68635d8f06 api: support defined set modification via grpc
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori 722975bfaf policy: another cleanup
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00
ISHIDA WataruandFUJITA Tomonori 7937d8ddb6 policy: clean up
remove redundant api structures and shorten valiable names
re-implement *ToApiStruct functions as a method of each structures

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-10-20 10:33:10 +09:00