summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2018-03-19packet/bgp: make serialization of ipv4/v6 nlri goroutine-safeFUJITA Tomonori
The serialization of ipv4/v6 nlri should be goroutine-safe but somehow not. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-02GoBGP 1.29FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-25docs: update gettting-startedFUJITA Tomonori
The way to install GoBGP is outdated. README tells how so let's remove. Also bash completion scripts haven't be updated for long time so let's remove too. [ci skip] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-23zclient: Avoid directly access to RIBIWASE Yusuke
In order to avoid races, zclient should not access to RIB without calling APIs of BgpServer. But currently zclient directly accesses to the global RIB when handling NEXTHO_UPDATE messages. This patch fixes this problem by calling BgpServer.GetRib(). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-22packet/bgp: Return specified type value for UnknownExtendedIWASE Yusuke
Currently, "UnknownExtended.GetTypes()" returns always the constant values even if "Type" value is given. This patch fixes to return the given type value and use the first "Value" byte as the sub type. Also, introduces "NewUnknownExtended()" function for the convenience. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-22packet/bgp: Flatten structure of OpaqueExtendedIWASE Yusuke
Currently, to instantiate sub types of the Opaque Extended Community, it is required to instantiate "OpaqueExtended" and its value type (e.g., "ValidationExtended" or "EncapExtended") and also specify its sub type. This can cause the confusion of the outer and inner (value) structures and the unmatch of the value structure and its sub type. This patch makes the "OpaqueExtended" into more flat structure and introduces "NewXxxExtended()" function to improve usability. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-22packet/bgp: Fix a typo of TunnelType stringIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-21table: fix handleMacMobility()FUJITA Tomonori
needs to find a diffrent ESI with the same mac address. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-21packet/bgp: Rename AigpTLV to AigpTLVInterfaceIWASE Yusuke
The other interface types in "packet/bgp" package have "Interface" suffix. This patch fixes to follow this naming convention. Golang's naming convention recommends to use "er" suffix though. Also, this patch moves the AIGP TLVs definitions to the near of the PathAttributeAigp structure and defines NewAigpTLVDefault function. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-19packet/bgp: Fix a typo of TunnelEncapSubTLVUnknownIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-18add golang 1.10 supportFUJITA Tomonori
drop 1.8 support also. Note that ugly double quates are necessary https://github.com/travis-ci/gimme/issues/132 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-16config/default: Default value of route-reflector-cluster-idIWASE Yusuke
Currently "0.0.0.0" is the default of "route-reflector-cluster-id" and this patch fixes to use "router-id" as its default value. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-16table/path: Originator ID for locally generated pathsIWASE Yusuke
The current implementation unexpectedly sets "0.0.0.0" as the ORIGINATOR_ID value for the locally generated paths when acting as a Route Reflector. This patch fixes to set own Router ID as the ORIGINATOR_ID value. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-16cli: Support to advertise PMSI Tunnel AttributeIWASE Yusuke
This patch enables "gobgp" command to advertise the PMSI Tunnel Attribute which is appended to the EVPN Inclusive Multicast Ethernet Tag routes for example. Usage Example: $ gobgp global rib -a evpn add multicast 10.0.0.1 etag 10 rd 65000:100 pmsi ingress-repl 100 1.1.1.1 $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:multicast][rd:65000:100][etag:10][ip:10.0.0.1] 0.0.0.0 00:00:00 [{Origin: ?} {Pmsi: type: ingress-repl, label: 100, tunnel-id: 1.1.1.1}] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-16cli: Display error reason for "rib add/del" commandsIWASE Yusuke
Currently, the error reason for "rib add/del" commands are displayed only when the "*-flowspec" families. This patch fixes to display the error reason for other families and helps to detect which arguments are invalid. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-16packet/bgp: Fix bitSize of ESI typeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-13packet/bgp: Refactor TunnelEncapSubTLV structureIWASE Yusuke
This patch refactors the structure of TunnelEncapSubTLV sub-types to have the similar structure of PathAttribute sub-types, and makes easy to implement MarshalJSON() functions for TunnelEncapSubTLV sub-types. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-13packet/bgp: Missing String()/MarshalJSON() of PathAttribute subsIWASE Yusuke
First this patch removes String() and MarshalJSON() functions of PathAttribute struct. This helps to find the struct types which embed PathAttribute struct without having own String() and MarshalJSON() functions. If those functions of PathAttribute struct are unexpectedly called, those functions are not enough to display its contents. Then this patch implements missing String() and MarshalJSON() functions for some struct types which embed PathAttribute struct. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-13packet/bgp: Remove raw binary field on PathAttributeIWASE Yusuke
The current implementation, PathAttribute stores the raw binary data as "Value" field, but this field increases the memory consumption. This patch removes "Value" field to slim down. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-10flow_spec_test: Enhance test cases with ExaBGPIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-10test/lib/exabgp: Enable to get adj-RIB-{in,out}IWASE Yusuke
"exabgpcli" supports to show adj-RIB-in and adj-RIB-out, this patch enables ExaBGPContainer to get these RIBs information. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-10test/lib/exabgp: Use exabgpcli to add/del routesIWASE Yusuke
Currently, to advertise or withdraw routes with ExaBGPContainer, we need to configure static routes via config file and restart ExaBGP daemon. In other words, we can NOT send withdrawing advertisement with ExaBGPContainer. Also, restating ExaBGP daemon frequently can make scenario test unstable, and it should be avoided. On the other hand, with ExaBGP version 4.0.5 or later(*), we can advertise or withdraw routes using "exabgpcli" without restating ExaBGP daemon (or writing application which calls ExaBGP's APIs). This patch fixes to use "exabgpcli" and reduces the number of restating ExaBGP daemon. Note: According to this change, adding routes into ExaBGP should be called after adding neighbor. (*): "exabgpcli" is introduced at version 4.0.2, but has some bugs related to Python 3 compatibility and FlowSpec rules combinations, then we need to use version 4.0.5 or later. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-08config: Option to disable best path selectionIWASE Yusuke
Note: When this option is specified, no path will be redistributed to any peer, because there is no best path. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-06table: Change type of BestPathReason to uint8IWASE Yusuke
The current type is string, which size is multiple of byte(=uint8). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-06table: replace time.Time struct with int64 in originInfo structFUJITA Tomonori
We don't need nanosecond precision. shrinks from 96 to 80 bytes. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-06table: change originInfo struct layout to reduce the sizeFUJITA Tomonori
shrinks from 112 to 96 bytes. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-02GoBGP 1.28FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-01server: fix dynamic neighbor crashFUJITA Tomonori
close #1575 if L854 is executed before L924, we hit a crash because of closing a channel twice. This fixes the isseu but We had better to refactor the code to delete a peer. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-27scenario_test: Enable to try assertion several timesIWASE Yusuke
Some times, on Travis-CI, some test cases fail unexpectedly in checking paths in RIBs due to advertisements are not yet received from other routers. Currently, in order to avoid this unexpected result, "time.sleep" is inserted after adding new routes, but it is not enough. This patch introduces a new function to enable to do assertion several times and avoid failure with the first assertion. Note: This patch does not introduces this change into all test cases, do only into some test cases which fail relatively frequently. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-27test/lib/gobgp: Adding routes without reloadingIWASE Yusuke
With the current implementation, when adding routes on GoBGPContainer, we re-configure and reload daemon, then add routes using CLI command. Differ from QuaggaBGPContainer, when deletion of routes, reloading is not required, but if reloading daemon frequently, we need to wait for the daemon restarting, it causes testing time longer and unstable. This patch enables to add routes without reloading daemon. Note: According to this change, adding routes should be called after starting daemons. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-27test/lib/Quagga: Use vtysh to add/del routesIWASE Yusuke
Currently, to advertise or withdraw routes on QuaggaBGPContainer, we need to configure static routes in configure file and restart Quagga daemons. In other words, we can NOT send withdrawing advertisement from Quagga side. Also, restating Quagga daemons frequently can make scenario test unstable, and it should be avoided. This patch fixes to use "vtysh" and reduces the number of restating Quagga daemons. Note: According to this change, adding routes on Quagga should be called after starting daemons. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-26server: Avoid to delete received paths with DeletePath APIIWASE Yusuke
"cli-command-syntax.md" describes "rib del all" command should delete all locally generated paths, but currently this command deletes all paths including received path from neighbors unexpectedly. This patch fixes the DeletePath API to delete only locally generated paths and solves this problem. Current: $ gobgp global rib -a ipv4 Network Next Hop AS_PATH Age Attrs *> 10.12.1.0/24 0.0.0.0 00:00:00 [{Origin: ?}] * 10.12.1.0/24 10.0.0.1 65001 00:00:00 [{Origin: ?}] $ gobgp global rib -a ipv4 del all $ gobgp global rib -a ipv4 Network not in table With this patch: $ gobgp global rib -a ipv4 Network Next Hop AS_PATH Age Attrs *> 10.12.1.0/24 0.0.0.0 00:00:00 [{Origin: ?}] * 10.12.1.0/24 10.0.0.1 65001 00:00:00 [{Origin: ?}] $ gobgp global rib -a ipv4 del all $ gobgp global rib -a ipv4 Network Next Hop AS_PATH Age Attrs *> 10.12.1.0/24 10.0.0.1 65001 00:00:10 [{Origin: ?}] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-26server: resolve next-hop with FRR/Zebra for VRF routesAman Shaikh
2018-01-24travis: Run unit tests on i386 archIWASE Yusuke
To do more tests for the compatibility with the 32-bit architecture, this patch fixes to run "go build" in _unittest section and run unit tests with GOARCH="386". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-24travis: Add DescriptionIWASE Yusuke
"DESCRIPTION" env is not used in tests, just markers for improving the readability of the Travis-CI Web UI. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-24travis: Script to checkout use of avoided functionsIWASE Yusuke
For the 32-bit platform compatibility, strconv.Atoi() should be replaced by strconv.ParseUint() or strconv.ParseInt(). This scripts prevents the use of these functions which should not be used with some reasons. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-24*: Use strconv.ParseUint instead of strconv.Atoi()IWASE Yusuke
For the 32-bit platform compatibility. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-23fix breakage with the latest github.com/satori/go.uuidFUJITA Tomonori
The API has changed with the master branch of go.uuid. GoBGP uses the dependency management tool so it's not problem. However, there are projects using GoBGP as a library and doesn't use a dependency management tool... GoBGP has used a released version of go.uuid so now I have to change Gopkg.toml to use tha master branch. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-19test/lib/{bird,gobgp,quagga,yabgp}: Wait for daemon bootIWASE Yusuke
Currently, scenario test library does not wait for the daemons boot in containers at starting up or after sending SIGHUP for reloading new configurations. So some test cases (e.g., graceful_restart_test.py) fails occasionally to insert static routes into GoBGP after reloading new configurations. This patch fixes to wait for the daemons boot and improves the stability of scenario tests. Note: This patch does not introduce these improvements to BagpipeContainer and ExaBGPContainer, because; - Docker image for BaGPipe, which used in scenario test library, is too old and BagpipeContainer does not seem to be used in the current test cases. - The version of ExaBGP in "osrg/exabgp" Docker image has no way to ask the daemon status other than "ps" command ("ps" is already done, but not enough). If "exabgpcli" is available on ExaBGP container, which is required the next release of 4.0.2 or 3.4.21, we can use it to check whether ExaBGP is started up or not. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-19flow_spec_test: Enhance test cases with YABGPIWASE Yusuke
This patch extends test cases using YABGP; - Test "gobgp" command outputs representations with IPv4/IPv6 - IPv4 FlowSpec rules advertisements and withdraws TODO: Supports test cases for the IPv6 FlowSpec rules withdraws when YABGP supports the IPv6 FlowSpec or when ExaBGP fixes issues(*) of logging the received FlowSpec rules. (*): ExaBGP (v4.0.2 or v3.4.21) will failed to log the received FlowSpec rules which contains some specific operators/operands (e.g., "!=" or empty operator). Then, we need to wait for the next release to implement more test cases. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-19test/lib: Add YABGP containerIWASE Yusuke
Note: This implementation supposes the YABGP version 0.4.0. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-19test/lib/base: Delete FlowSpec routes with keywordIWASE Yusuke
Currently, in case of the FlowSpec routes, "prefix" value which stored on each container instance is just a keyword and not valid NLRI arguments for adding or deleting routes. So when deleting routes with "route" keyword, it is required to construct the NLRI arguments using "matchs" value. This patch enables to construct the valid NLIR arguments as "prefix" value when adding the FlowSpec routes and enables to delete the FlowSpec routes with "route" keyword. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-19docs: fix typo in READMEDennis Durling
is, not in
2018-01-18zebra.md: Description for supported version of FRRoutingIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-18zebra.md: Update for Markdown linterIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-16gobgp/cmd/mrt: Avoid if statement always trueIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-13cli: fix mrt to drop MP_REACH attribute when injectingFUJITA Tomonori
The GoBGP API gives an error with a path having multiple nlris MP_REACH attribute. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-12packet/bgp: use strconv.ParseUint instead of strconv.Atoi()Vincent Bernat
Atoi() returns a signed int. On a 32-bit platform, this is not big enough to fit an unsigned 32-bit int. Replace all occurrences of Atoi() to ParseUint() with the appropriate size as a parameter. This fix this failure: ``` --- FAIL: Test_ParseEthernetSegmentIdentifier (0.00s) Error Trace: bgp_test.go:1181 Error: Expected nil, but got: &errors.errorString{s:"invalid esi values for type ESI_AS: [2864434397 287454020]"} Error Trace: bgp_test.go:1182 Error: Not equal: bgp.EthernetSegmentIdentifier{Type:0x5, Value:[]uint8{0xaa, 0xbb, 0xcc, 0xdd, 0x11, 0x22, 0x33, 0x44, 0x0}} (expected) != bgp.EthernetSegmentIdentifier{Type:0x5, Value:[]uint8{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}} (actual) Diff: --- Expected +++ Actual @@ -1,2 +1,2 @@ -(bgp.EthernetSegmentIdentifier) ESI_AS | as 2864434397, local discriminator 287454020 +(bgp.EthernetSegmentIdentifier) ESI_AS | as 0, local discriminator 0 FAIL FAIL github.com/osrg/gobgp/packet/bgp 0.003s ```
2018-01-12cli-command-syntax: Update desc for "monitor" commandIWASE Yusuke
This patch adds a section for "monitor adj-in" command and updates syntax and output examples for other "monitor" sub commands. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-12cli: "monitor neighbor" command supports current flagIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>