summaryrefslogtreecommitdiffhomepage
path: root/table
AgeCommit message (Collapse)Author
2016-01-09config: change enum value type to string for ease of configurationISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
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-09table: copy path-attr list before converting to as2 pathISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-06policy: remove heavy debug msgISHIDA Wataru
Sprintf() to stringify Fields is heavy 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-25table: fix UpdatePathAttrs2ByteAs and UpdatePathAttrs4ByteAsISHIDA Wataru
2015-12-24policy: fix insufficient nil checkISHIDA Wataru
RouteAction is interface. we have to check the contained value is also nil. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-22table: fix the number of acceptedFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-17bmp: fix post-policy bmp message creationFUJITA Tomonori
post-policy code creates paths from bgp update and then create the message from the modified paths. MP_UNREACH needs to be handled diffently. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-16table: always try to merge NLRIs to one messageFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@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-08table: remove useless table owner memberFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08table: remove unused DeletePathsforPeer()FUJITA 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-02make adj-rib implementation more clear and efficientISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-02table: improve implicitWithdraw()FUJITA Tomonori
remove one loop. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-02table: sort all known paths instead of just selecting bestISHIDA Wataru
this is a preparation for add-path recv/send feature Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-18rpki: fix IPv4-mapped addresss handlingFUJITA Tomonori
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-12table: fix how to mark a path as best in ToApiStruct()ISHIDA Wataru
When two peers advertise exactly same path, one will be marked as best, and another will not. In this case, in ToApiStruct(), we mustn't mark a path as best by Equal() method since Equal() compare path's content, not identity. Signed-off-by: ISHIDA Wataru <ishida.wataru@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-08table: fix local-pref handling for external peerISHIDA Wataru
remove a local-pref path attribute when peer is external and not a confederation member. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-08table: use a local configured med/local-pref path-attr if existsISHIDA Wataru
If a path is generated locally and it has a med/local-pref path attribute, don't remove or alter that. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-27server: fix RPKI verification to handle ASPATH ATTR TYPE properlyFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-27server: fix radix key bug in rpki testFUJITA Tomonori
also clean up functions to create a radix key. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-24policy: use radix-tree for prefix-list matchingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-24policy: modify path.GetAsSeqList() to insert 0 for non-seq-as-elemsISHIDA Wataru
GetAsSeqList() is used for AsPathSet matching and AsPathPrepend action. Just eliminating non-seq-as-elems from what GetAsSeqList() returns cause wrong results for these two match/action. e.g path A's as-path: {100, 200} 300 currently, action 'as-path-prepend left-most repeat 2' will alter as-path to 300 300 {100, 200} 300, which is not expected behavior. To fix this, insert 0 for non-seq-as-elems. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-24policy: speed up as-path matchingISHIDA Wataru
when matching with single as-path, stop using regexp for speed up Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-21policy: add missing argHiroshi Yokoi
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
2015-10-21policy: add field keysHiroshi Yokoi
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
2015-10-21server: remove peer's getBests methodFUJITA Tomonori
Use TableManager's getBestPathList Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-21table: make AdjRib API take slice of RouteFamilyFUJITA Tomonori
Make the code simpler Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-21table: store the list of route family in TableManagerFUJITA Tomonori
Will be used later to avoid generate the list of route family every time. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-20policy: name statement automatically also via grpcISHIDA Wataru
fix an incomplete commit 204eacc5c0503cecc796a74fd0c1948ad6a28051 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20policy: avoid null pointer dereferenceISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20api: stop using raw flag values and define grpc dedicated flagsISHIDA Wataru
make it easy to use grpc api Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20policy: fix how to apply policy to follow openconfig descriptionISHIDA Wataru
OpenConfig model says for Route policy evaluation: Evaluation of each policy definition proceeds by evaluating its corresponding individual policy statements in order. When a condition statement in a policy statement is satisfied, the corresponding action statement is executed. If the action statement has either accept-route or reject-route actions, policy evaluation of the current policy definition stops, and no further policy definitions in the chain are evaluated. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20policy: remove debug logHiroshi Yokoi
2015-10-20api: support policy assignment modification via grpcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20policy: name statement automatically when name is not givenISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20api: support policy modification via grpcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20api/cli: refactor api to retrieve policyISHIDA Wataru
make it similar to other policy api Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20cli: support statement configurationISHIDA Wataru
- create statement $ gobgp policy statement add st01 - add community condition $ gobgp policy statement st01 condition add community c1 - add route action $ gobgp policy statement st01 action add accept - add set-community action $ gobgp policy statement st01 action add community 100:100 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20api: support statement modification via grpcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20api/cli: add api to retrieve statements and support showing them via cliISHIDA Wataru
$ gobgp policy statement $ gobgp policy statement st0 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20cli: support defined-set configurationISHIDA Wataru
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 <ishida.wataru@lab.ntt.co.jp>
2015-10-20api: support defined set modification via grpcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20policy: another cleanupISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>