summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2015-07-01packet: give better name and comments for label structISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01bgp: add PMSI Tunnel Path Attribute(RFC6514) serializer/decoderISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01table: remove unused field/funcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01table: check paths' equivalence deeperISHIDA Wataru
if we add same path multiple times by the following gobgp cli commands, $ gobgp global rib add 10.0.0.0/24 $ gobgp global rib add 10.0.0.0/24 $ gobgp global rib add 10.0.0.0/24 current implementation sends multiple update messages to peers even through the content of the path is same. This is due to the shallow equivalence checking. This patch checks paths' equivalence deeper by adding Equal() method to Path. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01table: simplify Path.getPathAttr()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01table: refactor Path/Destination/Table structISHIDA Wataru
Path/Destination/Table was defined as interface. Simplify by making them normal struct. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01server: use ToApiStruct() to get api structureISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-29doc: add a description of the med action to filter-detail.mdNaoto Hanaue
2015-06-29tool: update example_toml.goNaoto Hanaue
2015-06-26policy: add unit test for med action and bug fixNaoto Hanaue
2015-06-26policy: support med actionNaoto Hanaue
2015-06-26cli: add support of route filtering in show commandsISHIDA Wataru
$ gobgp global rib Network Next Hop AS_PATH Age Attrs *> 10.0.0.0/24 0.0.0.0 65000 00:10:17 [{Origin: IGP}] *> 10.0.0.0/25 0.0.0.0 65000 00:10:16 [{Origin: IGP}] *> 10.0.0.0/26 0.0.0.0 65000 00:10:15 [{Origin: IGP}] *> 10.0.1.0/24 0.0.0.0 65000 00:10:21 [{Origin: IGP}] *> 10.0.2.0/24 0.0.0.0 65000 00:10:20 [{Origin: IGP}] $ gobgp global rib 10.0.0.0/24 Network Next Hop AS_PATH Age Attrs *> 10.0.0.0/24 0.0.0.0 65000 00:10:54 [{Origin: IGP}] $ gobgp global rib 10.0.0.10 Network Next Hop AS_PATH Age Attrs *> 10.0.0.0/26 0.0.0.0 65000 00:11:16 [{Origin: IGP}] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25server: don't block when broadcastingISHIDA Wataru
add empty default case to avoid blocking Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25cli: handle json option for monitor commandsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25cli: add a command to monitor changes of neighbor stateISHIDA Wataru
$ gobgp monitor neighbor [NEIGH] 192.168.10.5 fsm: BGP_FSM_IDLE admin: ADMIN_STATE_UP [NEIGH] 192.168.10.5 fsm: BGP_FSM_ACTIVE admin: ADMIN_STATE_UP [NEIGH] 192.168.10.3 fsm: BGP_FSM_OPENSENT admin: ADMIN_STATE_UP [NEIGH] 192.168.10.3 fsm: BGP_FSM_OPENCONFIRM admin: ADMIN_STATE_UP [NEIGH] 192.168.10.3 fsm: BGP_FSM_ESTABLISHED admin: ADMIN_STATE_UP [NEIGH] 192.168.10.4 fsm: BGP_FSM_OPENSENT admin: ADMIN_STATE_UP [NEIGH] 192.168.10.4 fsm: BGP_FSM_OPENCONFIRM admin: ADMIN_STATE_UP [NEIGH] 192.168.10.4 fsm: BGP_FSM_ESTABLISHED admin: ADMIN_STATE_UP Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25server/api: add api to monitor changes of neighbor stateISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25cli: add a command to monitor changes of best pathsISHIDA Wataru
$ gobgp monitor global rib [ROUTE] 10.0.1.0/24 via 192.168.10.3 aspath [65001] attrs [{Origin: IGP} {Med: 0}] [ROUTE] 10.0.2.0/24 via 192.168.10.4 aspath [65002] attrs [{Origin: IGP} {Med: 0}] [ROUTE] 10.0.3.0/24 via 192.168.10.5 aspath [65003] attrs [{Origin: IGP} {Med: 0}] [ROUTE] 10.0.4.0/24 via 192.168.10.6 aspath [65004] attrs [{Origin: IGP} {Med: 0}] [DELROUTE] 10.0.4.0/24 via 192.168.10.6 aspath [65004] attrs [{Origin: IGP} {Med: 0}] [DELROUTE] 10.0.2.0/24 via 192.168.10.4 aspath [65002] attrs [{Origin: IGP} {Med: 0}] [DELROUTE] 10.0.3.0/24 via 192.168.10.5 aspath [65003] attrs [{Origin: IGP} {Med: 0}] [ROUTE] 10.0.3.0/24 via 192.168.10.5 aspath [65003] attrs [{Origin: IGP} {Med: 100}] [ROUTE] 10.0.6.0/24 via 192.168.10.5 aspath [65003 65005] attrs [{Origin: IGP} {Med: 100}] [ROUTE] 10.0.2.0/24 via 192.168.10.4 aspath [65002] attrs [{Origin: IGP} {Med: 200}] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25server/api: add api to monitor changes of best pathsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25docs: add mrt documentISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25gomrt: split parsing and sending into different goroutinesISHIDA Wataru
another performance improvement. [before] $ time gomrt -i rib.20150617.2000 gomrt -i /vagrant/rib.20150617.2000 48.98s user 149.40s system 97% cpu 3:24.30 total [after] $ time gomrt -i rib.20150617.2000 gomrt -i /vagrant/rib.20150617.2000 30.57s user 99.59s system 96% cpu 2:15.27 total Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-25mrt: bug fix of decoding BGP4MPHeaderISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-23cli: update to auto-complete the element each policy subcommandNaoto Hanaue
2015-06-23cli: update to auto-complete the IP address of the neighborNaoto Hanaue
2015-06-23cli: update to the bash completion that was automatically generated using ↵Naoto Hanaue
the cobra library
2015-06-23server: fix bug of not sending paths added/deleted through grpcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-23table: use isLocal() to check if path is locally generatedISHIDA Wataru
original code assumes locally generated path's source is nil, which is not true. use isLocal() instead. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-23table: add Equal() method to compare PeerInfoISHIDA Wataru
this patch fixes the wrong behavior shown below $ gobgp global rib add 10.0.0.0/24 $ gobgp global rib del 10.0.0.0/24 $ gobgp global rib Network Next Hop AS_PATH Age Attrs *> 10.0.0.0/24 0.0.0.0 65000 00:05:48 [{Origin: IGP}] since we used to compare path's source by PeerInfo's pointer, locally originated routes is considered as a different route even if they have same prefix. this patch introduce Equal() method to compare PeerInfo's content and fix this wrong behavior. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-21api: change ModPath() return value to Error from stream ErrorISHIDA Wataru
cut useless grpc communication and improve performance simple performance test result. rib.20150617.2000 is taken from http://archive.routeviews.org/ [before] $ time gomrt -i rib.20150617.2000 gomrt -i /vagrant/rib.20150617.2000 45.96s user 171.73s system 86% cpu 4:11.87 total [after] $ time gomrt -i rib.20150617.2000 gomrt -i /vagrant/rib.20150617.2000 11.95s user 76.17s system 74% cpu 1:58.38 total Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-21gomrt: add mrt route injectorISHIDA Wataru
$ gomrt -i <mrt rib file> -c <number of routes to inject> Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-21gomrt: add mrt packet libraryISHIDA Wataru
currently TABLE_DUMPV2 and BGP4MP message is supported Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: make routeFamilyPrefix public and give a better nameISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: make getPathAttribute publicISHIDA Wataru
we use this function later in mrt code Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: flag down BGP_ATTR_FLAG_PARTIAL when validating flagsISHIDA Wataru
BGP_ATTR_FLAG_PARTIAL flag can be set even for the valid path attributes. Nessesary validation related to BGP_ATTR_FLAG_PARTIAL is all done before here. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: handle RF_IPV4_MC, RF_IPV6_MC cases in routeFamilyPrefix()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: make debug message more helpfulISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: store path attr flag as type BGPAttrFlagISHIDA Wataru
also add more meaningful debug message to ValidateFlags() Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: gofmtISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-18scenario_test: check gobgp container before remove in its preparationHiroshi Yokoi
2015-06-17docs: update cli-command-syntax.mdNaoto Hanaue
2015-06-17cli: add community subcommand to policy conditions and actionsNaoto Hanaue
2015-06-16cli: add aspath subcommand to policy conditionsNaoto Hanaue
2015-06-16cli: fix cli of policyNaoto Hanaue
- fix bug that del all command can not be used - fix bug that can enter the option of conditions other than add subcommand - fix bug that can not enter the option of actions in the routepolicy (add) subcommand - chenge syntax of routepolicy (add) subcommand aggregate the option flags of conditions and actions + before % gobgp routepolicy add <policy> <statement name> conditions [<option flags of conditions> ...] % gobgp routepolicy add <policy> <statement name> actions [<option flags of actions> ...] + after % gobgp routepolicy add <policy> <statement name> [<option flags of conditions and actions>...]
2015-06-16cli: aggregate grpc communication interface associated with the policy to ↵Naoto Hanaue
api.policyDefinition
2015-06-16cli: add a flag to generate bash completion fileISHIDA Wataru
generate bash completion file by $ gobgp -c We have to work more to generate more useful completion file automatically. Currently generated completion file can't complement dynamic commands e.g. gobgp neighbor <peer ip addr> local -a ipv6 <peer ip addr> is a dynamic command. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-16cli: use github.com/spf13/cobra instead of github.com/jessevdk/go-flagsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-16server: check if local table exists for a neighborISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-16server: add error handling for grpcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-12scenario_test: fix doesn't execute 'go build' and 'go get' if you don't ↵Naoto Hanaue
specify the use-local option
2015-06-10scenario_test: execute the cli command using the docker exec in testNaoto Hanaue
2015-06-10doc: fix indentationHiroshi Yokoi