summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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>
2018-01-12api: Support current flag in MonitorPeerState APIIWASE Yusuke
This patch adds "current" flag in MonitorPeerState API and enables to get the current (existing) neighbors when gRPC client connecting to GoBGP daemon. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-12client: Make MonitorNeighborState to get single argumentIWASE Yusuke
Currently, Client.MonitorNeighborState uses only first neighbor address even if it take variable length arguments (the second and following neighbor address is ignored implicitly). This patch fixes this function to take a single neighbor address and prevents user confusion. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-11server_test: Enhance test cases for MonitorRib APIIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-11server: Empty path list in initial WatchEventUpdateIWASE Yusuke
Currently, MonitorRib API with ADJ_IN type and "current" flag returns the initial response with an empty path list when gRPC client connecting to GoBGP daemon. This causes the client can not receive the current paths which GoBGP daemon already has. This patch fixes to compose the initial MonitorRib response with the current paths. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09bgp_zebra_test: Fix ping reachability testsIWASE Yusuke
Currently, we test the ping reachability of Quagga(o1) -> GoBGP(g1) -> Quagga(q1) in this scenario test, but in this case, two Quagga routers belong to the connected networks of GoBGP router and ping will succeed without the BGP advertisements. Then, even if GoBGP failed to install the received routes to the Linux routeing table via Zebra daemon, this test case will pass. This patch fixes to test the reachability of Quagga(o1) -> GoBGP(g1) -> Quagga(q1) -> Quagga(o2) and makes the advertised routes required to be installed into the g1's routing table. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09test/lib/base: Fix typosIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09test/lib/{gobgp,quagga}: IPv6 forwarding in zebra.confIWASE Yusuke
With this patch, it is not required to enable IPv6 forwarding by using "sysctl" explicitly in Quagga or GoBGP(Zebra enabled) containers. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09test/lib/base: Removes redundant routes from hostIWASE Yusuke
When creating a new Docker network (Linux Bridge), some routes to its subnet will be installed in to the container host's routing table. This routes enable containers to communicate each other through the container host's rouging table, then causes the unexpected success of scenario tests (e.g., ping between containers). This patch removes the unexpected routes from the container host and avoid this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09zebra/zapi: Fix Zebra API type when IPv6 routesIWASE Yusuke
When implementing the FRRouting message format, missed to detect the Zebra API type for adding/deleting IPv6 routes, and all API type will be encoded with the types for IPv4 routes unexpectedly. This patch fixes the encoded API type by determine the given prefix is IPv4 or IPv6. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-06travis: remove useless "go" sectionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-05travis: Run "dep ensure" before "go fmt" and "go vet"IWASE Yusuke
Because "satori/go.uuid" changed some syntax of its API, "go fmt" and "go vet" commands will fail with the latest codes. This patch fixes to run dep ensure before running these tests and solves this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-02GoBGP 1.27FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-30cli: Slash separated offset arg for FlowSpec PrefixIWASE Yusuke
Currently, "gobgp" command supports only; "<ipv6 prefix>/<len> <offset>" # space separated format to specify the prefix offset for the FlowSpec destination/source rules, but the displayed format with "rib" command is; "<ipv6 prefix>/<len>/<offset>" # slash separated and the slash separated format is not allowed as command arguments. This patch enables to specify the slash separated format for the FlowSpec destination/source rules arguments and resolve unmatch of the input/output formats. Example: $ gobgp global rib -a ipv6-flowspec add match destination 0:db8:1::1/64/16 then accept $ gobgp global rib -a ipv6-flowspec Network Next Hop AS_PATH Age Attrs *> [destination: 0:db8:1::/64/16] fictitious 00:00:00 [{Origin: ?} Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-30evpn.md: Add description and examples for ESIIWASE Yusuke
Also this patch updates table of contents. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-30cli: Support EVPN Default Gateway Extended CommunityIWASE Yusuke
This patch enables to support the Default Gateway Extended Community on the EVPN MAC/IP Advertisement route. Usage Example: $ gobgp global rib -a evpn add macadv aa:bb:cc:dd:ee:ff 10.0.0.1 etag 10 label 20,30 rd 1.1.1.1:65000 default-gateway $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:macadv][rd:1.1.1.1:65000][etag:10][mac:aa:bb:cc:dd:ee:ff][ip:10.0.0.1] [20,30] 0.0.0.0 00:00:00 [{Origin: ?} {Extcomms: [default-gateway]} [ESI: single-homed]] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-28addpath_test: Wait for re-establishment with ExaBGPIWASE Yusuke
When adding or deleting routes in ExaBGPContainer, it is required to restart ExaBGPContainer with the current implementation. This patch fixes to wait for the re-establishment with ExaBGP and improves the stability of this test case. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-21zebra: fix 'directly-connected' type configuration from grpc apiFUJITA Tomonori
Works but sorta hacky. We should revise after the GRPC API udpate. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-21doc: CLI Syntax for EVPN routesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-21cli: Enable to filter EVPN routes by Route TypeIWASE Yusuke
Currently, "gobgp" command supports only to display all routes on RIBs, but with huge RIBs, it is convenient to select routes by a part of NLRI fields. This patch enables to filter routes by EVPN Route Type. For example, when 5 routes for each route type; $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:A-D][rd:65000:100][esi:single-homed][etag:10] [10] 0.0.0.0 00:01:09 [{Origin: ?}] *> [type:Prefix][rd:65000:100][etag:10][prefix:10.0.0.0/24] [0] 0.0.0.0 00:00:04 [{Origin: ?} [ESI: single-homed] [GW: 0.0.0.0]] *> [type:esi][rd:65000:100][esi:single-homed][ip:10.0.0.1] 0.0.0.0 00:00:19 [{Origin: ?}] *> [type:macadv][rd:65000:100][etag:10][mac:aa:bb:cc:dd:ee:ff][ip:10.0.0.1] [20,30] 0.0.0.0 00:00:54 [{Origin: ?} [ESI: single-homed]] *> [type:multicast][rd:65000:100][etag:10][ip:10.0.0.1] 0.0.0.0 00:00:33 [{Origin: ?}] You can select multicast route as following; $ gobgp global rib -a evpn multicast 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:03:02 [{Origin: ?}] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-20table: fix converting 2bytes to 4bytes AS PATHFUJITA Tomonori
On some conditions, we add some ASes to As4PathParam.AS but don't update As4PathParam.Num (the number of ASes). It breaks serialization of AS4PathParam. Instead of modifying the internal of As4PathParam, let's create a new As4PathParam object. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17packet/bgp: use strconv.FormatInt() instead of strconv.Itoa() in testsVincent Bernat
Itoa() takes an int which will only be 32-bit on i386 and similar architectures. In tests, some constants are too big. Therefore, switch all uses of strconv.Itoa() to strconv.FormatInt(). Without this change, we get: ``` src/github.com/osrg/gobgp/packet/bgp/bgp_test.go:1123:41: constant 2864434397 overflows int ```
2017-12-16config: Move some functions to util.goSatoshi Fujimoto
default.go and serve.go has some functions which are not directly related to its main role. This commit moves those functions to util.go, a more suitable place. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-12-16config/util: Refactor to make arguments to receiversSatoshi Fujimoto
For code readability, this commit make some arguments to receivers. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-12-16travis: use old Trusty imagesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-16docs: Update docs for prefix representations in Neighbor SetSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-12-16table/policy: Support prefix representation in NeighborSetSatoshi Fujimoto
Currently, "neighbor-set" supports only IP address representation and IP prefix representation(such as "192.168.0.0/24") is not supported. This commit enables to accept the prefix representation for "neighbor-set" to allow neighbors to be specified as range. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-12-16docs: cli-command-syntax.md: Missing arg to show VRF RIBIWASE Yusuke
This patch fixes the example on the doc for showing the VRF RIB where the "rib" keyword is missing to execute the command. Also, the "-a <adddress family>" is an option and this patch puts it into brackets. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-16docs: update evpn.md for with yabgp 0.4.0sanjmonkey
Notable change: extended community formatting. # YaBGP BGP EVPN extended communities: mac-mobility esi-label es-import router-mac
2017-12-16use label for containers and networks in order to avoid colliding with othersImcom Jin
2017-12-16strict on nosetest reports regexImcom Jin
2017-12-11docs: Equal Cost Multipath Routing with ZebraIWASE Yusuke
This patch adds a new document explains Equal Cost Multipath routes with Zebra integration. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-07bmp: set A flag in Per-Peer HeaderFUJITA Tomonori
Needs to set set A flag in Per-Peer Header if the peer use the legacy 2-byte AS_PATH format. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>