summaryrefslogtreecommitdiffhomepage
path: root/api
AgeCommit message (Collapse)Author
2017-11-23table: add attribute hash value to Path structureFUJITA Tomonori
This is for batching paths into one bgp message. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-16api: Activate address family using Peer.AfiSafisIWASE Yusuke
Currently, to configure per AFI-SAFI settings when adding neighbor via gRPC API, it is require to specify the both Peer.Families and Peer.AfiSafis fields. If Peer.Families is omitted, settings in Peer.AfiSafis are ignored and the given address families are not activated. This patch enables to configure per AFI-SAFI settings and activate the address family with only Peer.AfiSafis (without Peer.Families). Note: For the backward compatibility, if only Peer.Families is specified, this patch creates per AFI-SAFI settings with the default settings. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-16api: Define constants for address familiesIWASE Yusuke
To call some gRPC APIs, it is required to specify the address family value which is combined value of AFI and SAFI values, so users of gRPC APIs need to calculate this value. This patch introduces the constants for the address families for the convenience. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-13api/grpc_server: Remove redundant loop for gRPC serverIWASE Yusuke
gRPC server should try to start serving only once because it send stopped signal to the waiter if server could not start. This patch removes redundant "for" loop to improve code inspection result. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-13api/grpc_server: Avoid name collision "server"IWASE Yusuke
To improve code inspection result, this patch renames "server" variables in NewServer() to "s" because "server" collides the imported package name "github.com/osrg/gobgp/server". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-13api/grpc_server: Use make() for an empty slice declarationIWASE Yusuke
To improve code inspection result, this patch uses make() for an empty slice declaration instead of using empty literal initializer. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-13api/grpc_server: Avoid index error when invalid set-med valueIWASE Yusuke
Currently, with a invalid "set-med" value in a policy action, GoBGP will raise panic of "index out of range" because the unmatched regular expression is not handled. This patch fixes to handle errors during parsing the given med value. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-12cli: Support address families when adding neighborIWASE Yusuke
Currently, "gobgp" command does not support to configure address families capability when adding a new neighbor. This patch introduces a new option field to "gobgp neighbor add" command and enables to configure address families capability. Example: Specify address family names in comma separated format $ gobgp neighbor add 10.0.0.3 as 65003 family ipv4-unicast,l2vpn-evpn $ gobgp neighbor 10.0.0.3 ...(snip)... Neighbor capabilities: multiprotocol: ipv4-unicast: advertised l2vpn-evpn: advertised route-refresh: advertised 4-octet-as: advertised ...(snip)... Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-01Fix some typos found by spell checkerIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-10-03api: Enable to set/get add-paths config via gRPCIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-25api: GetPath API alternative to GetRibIWASE Yusuke
With the extremely large RIBs, GetRib gRPC API hits the limits of each message size, because this API is using simple request/response RPC. This patch introduces a new API GetPath which using streaming RPC and can retrieve RIBs even if extremely large. Note: GetRib can be replaced with GetPath and obsoleted in the future. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-15api: increase the max of grpc message sizeFUJITA Tomonori
by default, 4mb, too small, easily hit the limit: https://github.com/osrg/gobgp/issues/1430 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-14config: Introduce Family field into AfiSafiStateIWASE Yusuke
To reduce the translations of "AfiSafiName" into "bgp.RouteFamily", this patch introduces "Family" field into "AfiSafiState" and stores the translated value. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-08-29gobgp: support local-rib/all option in command "gobgp bmp add"Eiichiro Watanabe
2017-08-02table: allocate bitmap for path id dynamicallyFUJITA Tomonori
allocating 256 bytes per prefix isn't a good idea. Let's allocate 8 bytes by default and expand dynamically if necessary. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-26api: change the license of gobgp.proto from Apache to MITFUJITA Tomonori
To make it easier for other projects to include gobgp.proto file, let's use more permissive license, MIT. [skip ci] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-26api: add addpath support to AddPath API and cliFUJITA Tomonori
$gobgp global rib add 10.0.0.0/24 identifier 20 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-26add LocalPathIdentifierFUJITA Tomonori
add-path support needs two identifiers, remote (rx) and local (tx). The remote identifiers are assigined by remote peers, the local ones are assigned by gobgpd itself. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-19cli: get detailed RPKI informationSatoshi Fujimoto
This patch adds the feature in the neighbor subcommand to get detailed information about RPKI validation. The command receives a prefix in Adj-RIB-In, and gives the detailed RPKI information for the route. The informaton includes the validation status, the reason if it is invalid, and matched/unmatched VRPs. Example: $ gobgp neighbor 172.17.0.3 adj-in 2.1.0.0/16 validation Target Prefix: 2.1.0.0/16, AS: 65001 This route is invalid reason: as No VRP ASN matches the route origin ASN. Matched VRPs: No Entry Unmatched AS VRPs: Network AS MaxLen 2.0.0.0/12 3215 16 2.1.0.0/16 3215 16 Unmatched Length VRPs: No Entry Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-07-19table: Include detailed information about RPKI in originInfoSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-07-19api: Add RPKI detailed information structureSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-07-04api/cli: support showing path-identifierWataru Ishida
$ gobgp neighbor <neighbor address> ID Network Next Hop AS_PATH Age Attrs 2 10.0.0.10/32 10.10.1.2 01:05:35 [{Origin: i} {LocalPref: 100}] 1 10.0.0.10/32 10.10.1.1 01:05:35 [{Origin: i} {LocalPref: 100}] 3 10.1.0.10/32 10.10.1.3 01:05:35 [{Origin: i} {LocalPref: 100}] Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-06-26api: Enable to compose AfiSafi message structureIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-26api: Introduce AfiSafi message structure in PeerIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-16server: Support Dynamic NeighborSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-06-16config: Use State to get NeighborAddress instead of ConfigSatoshi Fujimoto
By introducing dynamic neighbor feature, GoBGP can have dynamic neighbors, and corresponding Config.NeighboAddress can be empty. This patch sets State.NeighborAddress for all neighbors, and gets the neighbor's address from them. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-06-12api: add graceful restart support to AddNeighbor APIFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-07replace github.com/Sirupsen/logrus with github.com/sirupsen/logrusFUJITA Tomonori
The usage of "github.com/sirupsen/logrus" is recommended. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-15bgp: Advertise IPv4 routes with IPv6 Next HopIWASE Yusuke
RFC5549 allows IPv6 Next Hop address for the advertisement of IPv4 related NLRIs for <AFI/SAFI> of <1/1>, <1/2>, <1/4> and <1/128>. Currently, the advertisement using the MP_REACH_NLRI is supported, but IPv4 routes with IPv6 Next Hop is not enough. This patch enable to advertise IPv4 routes for <AFI/SAFI> of <1/1> through GoBGP CLI command. e.g.) $ gobgp global rib add -a ipv4 10.2.1.0/24 nexthop 2001:2::1 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-10*: support replace-peer-as (aka as-override)Wataru Ishida
we use the term replace-peer-as instead of as-override since openconfig is using it. cli ``` $ gobgp n add <neighbor-addr> as <asn> replace-peer-as ``` config ``` neighbor: config: peer-as: <asn> neighbor-address: <neighbor-addr> as-path-options: config: replace-peer-as: true ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-10*: support remove private asWataru Ishida
cli ``` $ gobgp n add <neighbor-addr> as <asn> remove-private-as (all|replace) ``` config ``` neighbor: config: peer-as: <asn> neighbor-address: <neighbor-addr> remove-private-as: all ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-09server: ignore routes when local AS is in AS_PATHISHIDA Wataru
RFC4271 9.1.2 Phase 2: Route Selection If the AS_PATH attribute of a BGP route contains an AS loop, the BGP route should be excluded from the Phase 2 decision function. AS loop detection is done by scanning the full AS path (as specified in the AS_PATH attribute), and checking that the autonomous system number of the local system does not appear in the AS path. Operations of a BGP speaker that is configured to accept routes with its own autonomous system number in the AS path are outside the scope of this document. Also this commit adds support for allow-own-as option to relax this. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-05-09api: fix api/server struct conversionWataru Ishida
convert default in/import/export policy type remove remote-private-as, send-community since we are not using them Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-06cli: speed up showing a specific defined-setWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-04-20improve performance of getting single neighbor informationFUJITA Tomonori
avoid calculation of the number of adjout that will not be used. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-18cli: show neighbor max prefix configFUJITA Tomonori
fix NewNeighborFromAPIStruct() regression. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-04skip asn negotiation for BGP unnumbered peersISHIDA Wataru
since BGP unnumbered peers are typically trusted, skip asn negotiation for easy configuration. from configuration file: ```toml [[neighbors]] [[neighbors.config]] neighbor-interface = "eth0" ``` from cli: ``` $ gobgp neighbor add interface eth0 ``` Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-03-19table: handle IPv4-Mapped IPv6 Address as v6FUJITA Tomonori
Currently, Prefix structure wrongly handles IPv4-Mapped IPv6 Address as v4. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-06config: Config values for Nexthop Tracking with ZClientIWASE Yusuke
For configuring the Nexthop Tracking features with ZClient, this patch adds the config values: - "nexthop-trigger-enable" enables to the Nexthop Tracking features. Please note this features is only available with version 3 or later, and "true" by the default with that version. - "nexthop-trigger-delay" specifies the delay sec to update the nexthops triggered by the events from Zebra daemon. The default is 5 secs and the same with the default of Cisco's routers. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-06cli: Enable to get nexthop reachability stateIWASE Yusuke
This patch enables GoBGP CLI to get the best path based on the nexthop reachability state. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-02-15cli: add current option to monitor commandsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-02-15server: add a current option to WatchBestPath()ISHIDA Wataru
also, use it for zebra integration Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-02-03cli: Administrative Shutdown Communication on disable neighborIWASE Yusuke
This patch adds "--reason" option support into the disable neighbor command which can specify "Administrative Shutdown Communication" on the BGP Cease NOTIFICATION message. Usage: $ gobgp neighbor <neighbor address> disable --reason "some messages" Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-02-03cli: Communication on Administrative Shutdown NOTIFICATIONIWASE Yusuke
This patch enable to send an arbitrary message on the Cease NOTIFICATION message with "Administrative Shutdown" and "Administrative Reset" subcodes with "--reason" option. Usage: $ gobgp neighbor <neighbor address> shutdown --reason "some messages" $ gobgp neighbor <neighbor address> reset --reason "some messages" Reference: https://tools.ietf.org/html/draft-ietf-idr-shutdown-04 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-22api: add a UUID field to Path structureWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-06api: check grpc request is not nilISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-12-14policy: allow using invert condition in statementHiroshi Yokoi
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
2016-12-10policy: ext-community and large-community can be included in conditionsHiroshi Yokoi
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
2016-12-10server: don't assume (*api.Path).Nlri is ipv4 NLRIWataru Ishida
use (*api.Path).Family to decide how to decode (*api.Path).Nlri closes #1185 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-12-04client: AddNeighbor API doesn't include apply-policy informationkishiguro