summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2018-06-14simple staticcheck issuesJeff Bean
2018-06-14Pull regex into variables to prevent the regex to compile in the hotpathJeff Bean
2018-06-14UT: Remove redundant debug printIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-06-13table: support AfiSafiIn Policy Condition matchMarcin Ptaszyński
2018-06-13api: Implement Shutdonw()Satoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13api: Implement AddCollector()Satoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13api: Implement UpdatePolicy()Satoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13api: Implement PeerGroup and DynamicNeighbor APISatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13api: Add missing fields to Peer struct conversion functionsSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13api: Add some fields to notify Graceful Restart stateSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13api: Fix StartServerAPISatoshi Fujimoto
Currently, StartServerAPI accepts few parameters and setting such as BGP confederation and graceful restart cannot be configured via gRPC API. This commit fixes this API to accept all the parameters which is configurable in a configuration file/ Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13gobgpd: Use gRPC APIs Instead of BgpServer functionsSatoshi Fujimoto
In order to integarate the setting via configuration files and via gRPC API, This commit fixes gobgpd to use gRPC APIs instead of using BgpServer functions directly, for consistency. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13config: Change "RedistributeRouteTypeList" to []stringSatoshi Fujimoto
RedistributeRouteTypeList is []InstallProtocolType, but InstallProtocolType only defines limited number of protocols, And currently, EnableZebra() in gRPC API validates its request with the protocols defined by InstallProtocolType, so the protocols such as "babel" or "lldp" could not be configured to Zebra, via gRPC API. This patch fixes RedistributeRouteTypeList to be []string, and fixes EnableZebra() to validate with the protocols defined in zapi.go. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-13table: arrange fields to reduce paddingChris Stockton
This reduces the table.Path size from 88 to 72 which adds up considerably since it is the most allocated persistent object.
2018-06-13api: Use api/attribute.proto structure in gRPC APIIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-06-13api: Define protobuf structure for BGP Path AttributesIWASE Yusuke
Example of protoc command: $ export PROTOBUF=${HOME}/protobuf/src $ export GOBGP=${GOPATH}/src/github.com/osrg/gobgp $ protoc \ -I ${PROTOBUF} \ -I ${GOBGP}/api \ --go_out=plugins=grpc:${GOBGP}/api \ ${GOBGP}/api/gobgp.proto \ ${GOBGP}/api/attribute.proto Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-06-13gobgp/lib: Remove usage of utils of "gobgpapi"IWASE Yusuke
"gobgp/lib" can be independent from "gobgpapi" package, this patch removes the usage of utility function "ToPathApi()" in this package. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-06-11gobgp: fix mrt inject only best optionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-11table: fix Clone() to inherite the attribute hash valueFUJITA Tomonori
CreateUpdateMsgFromPaths() assumes that a path has a proper hash value. If a path doesn't, the function takes too long. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-11cmd: don't display uptime for a BGP session if no uptime informationVincent Bernat
Otherwise, we get something like this: BGP neighbor is 2001:db8:4::2, remote AS 65000 BGP version 4, remote router ID unknown BGP state = active, up for 17692d 16:53:12
2018-06-11packet/bgp: use 71 for BGP LLGR capability codeVincent Bernat
Since the RFC is only a draft, IANA didn't attribute a code yet. However, Juniper is supporting this feature since a long time and is using 71. I don't know if Cisco is using the same value. BIRD will ship soon with this capability too and will use 71 too. Wireshark also understands capability code 71 as LLGR. Tested with Juniper vRR 16.1 and this configuration: ```yaml peer-groups: - config: peer-group-name: others peer-as: 65000 ttl-security: config: enabled: true ttl-min: 255 graceful-restart: config: enabled: true long-lived-enabled: true notification-enabled: true restart-time: 1 afi-safis: - config: afi-safi-name: ipv6-unicast mp-graceful-restart: config: enabled: true long-lived-graceful-restart: config: enabled: true restart-time: 120 ``` Enabling regular graceful restart for the appropriate AFI/SAFI is needed to make LLGR work on the Juniper side. Unfortunately, GoBGP doesn't allow to set restart-time to 0 (this is the same as using the default value of 90s), therefore we have a small delay before LLGR kicks in (during which routes are preserved). A way to set restart time to 0 would be welcome.
2018-06-05server: fix GetRib() with rpkiFUJITA Tomonori
fix a bug that doesn't return validation results at all. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-05table: fix potential panics in tableKeyChris Stockton
It is possible for a call from other Table methods for an interface that does not match the tables route family to reach the type assertion and panic. This change better reflects the intention of the code by checking the concrete type using a type switch instead.
2018-06-05config: Improve golint resultsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-06-05config: Accept CLUSTER_ID as an integer valueIWASE Yusuke
Currently, only IPv4 address is acceptable for the CLUSTER_ID setting, this patch enables to specify the CLUSTER_ID as a 32-bit unsigned integer. With this expansion, "Config.RouteReflectorClusterId" stores the raw configured value for the CLUSTER_ID and "State.RouteReflectorClusterId" stores the value used for construct the CLUSTER_LIST attribute. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-06-05cmd/rpki_test: Unit test for showRPKITableIWASE Yusuke
Adds an unit test for ed3f7b711c92c69bf231bc9e6a06312b23270db0 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-06-05table: support nexthop match policyurban
2018-06-05Fix: ruby client failed with "Enum value '_' does not start with an ↵Shintaro Kojima
uppercase letter as is required for Ruby constants"
2018-06-01GoBGP 1.32FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-31server: reject route without origin attribute via AddPath()FUJITA Tomonori
We should do stricter validation. Probably, we should use packet/bgp/validate.go. close #1660 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-31cli: Implement "neighbor update" commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-29gobgp/cmd: add message gRPC connection errorPaul Greenberg
Adds a user-friendly error message on gRPC connection error. Resolves: #1701 Signed-off-by: Paul Greenberg <greenpau@outlook.com>
2018-05-30api: fix rpki regressionFUJITA Tomonori
the commit 8c453bc9369e4cd96d19b9598bebb0ea2e23e991 fixes NewROAListFromApiStructList() to check an error strictly. However, this breaks the rpki table command: $ gobgp rpki table invalid CIDR address: 1.0.16.0 NewROAListFromApiStructList() has a bug about getting the address family from an IP address. The address family was not used (other information are used though) so before the commit, the command worked. This fixes the bug in NewROAListFromApiStructList(). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-30graceful_restart_test: Confirm stale paths removedIWASE Yusuke
This patch adds checks to confirm the stale paths are also removed from the adj-RIB-in table. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-30graceful_restart_test: Assert timer not expiredIWASE Yusuke
This patch fixes to assert the Graceful Restart time is not expired while waiting for re-establishing peer connection. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-30scenario_test: Extend Graceful Restart timeIWASE Yusuke
The current Graceful Restart time is 20 sec, but this value is not enough long and can be exceeded unexpectedly while waiting for re-establishing peer connections. Then the stale paths on a receiving router are dropped before the paths successfully synced, and some test cases on "graceful_restart_test.py" will be passed unexpectedly. This patch extends the Graceful Restart time to 30 sec and introduces the constants for Graceful Restart time and Long-Lived Graceful Restart time. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-29bgp_zebra_nht_test: Test case to sync nexthop statesIWASE Yusuke
This patch adds a test case to test if the path, which came after the NEXTHOP_UPDATE message was received from Zebra, is updated by reflecting the nexthop cache. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-29zclient: Drop NextHop Tracking dampening featureIWASE Yusuke
The dampening feature was implemented to delay the update of nexthop states in order to avoid the states are "extremely" frequent updated. But with this implementation, if a path is withdrawn by peer or via API which the dampening feature delaying the update of that path, the withdrawn path can be restored unexpectedly again. And currently Quagga and FRRouting does not support the dampening, this path drops the dampening feature to avoid this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-29table: fix DropStale method in AdjRibFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-28table: update accepted number in adj-in rib after softreset-inFUJITA Tomonori
update accepted number in adj-in rib after AllowOwnAs has changed. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-28table: fix accepted number in adj-in ribFUJITA Tomonori
fix accepted number in adj-in rib when it has an as-looped path. adding another member to Path struct is pain. Should be fixed later. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-28table: remove unused Exists method in AdjRib strctureFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-28table: remove unused id in AdjRib strctureFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-28test/aspath: check accepted and received numbersFUJITA Tomonori
make sure that an adj-rib return the accepted and received numbers when it has an as-looped path. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-28rtc_test: Test cases for infinite RTC UPDATE loopIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-28rtc_test: Test cases for inter-ASIWASE Yusuke
This patch adds test cases for the Route Target Constraint of the inter-AS route distribution and combination of the inter-AS and intra-AS route distribution. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-28server: Apply rtfilter on eBGP sessionIWASE Yusuke
The outgoing Route Target Constraint filter should be applied to eBGP session, but currently applied to only iBGP session. This patch fixes to apply rtfilter on eBGP session. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-28rtc_test: Enhance test cases for intra-AS RTCIWASE Yusuke
This patch adds assertion points for the counts of advertised and received routes. Also adds comments for the states of VRFs and routes. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-28server: Prefer RTC route from RR clientIWASE Yusuke
In case that a Route Reflector(RR) and a non RR client peering, peering of different RR clusters for example, the RR should send the RTC route from its client even if the RTC route from non RR client is better path based on the best path algorithm in order to notify that some RR clients are interested in the given Route Target. Currently, only source peer address is concerned, the RTC route from RR client can have lower priority than non RR client and it can not be advertised. This patch fixes to prefer the route from RR client when selecting the candidate to be advertised. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-05-26server: fix infinite rtc update loop with addpathFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>