Age | Commit message (Collapse) | Author |
|
|
|
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>
|
|
"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>
|
|
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>
|
|
For the 32-bit platform compatibility.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Note: This implementation supposes the YABGP version 0.4.0.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
is, not in
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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
```
|
|
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>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
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>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
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>
|
|
Also this patch updates table of contents.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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>
|
|
Works but sorta hacky. We should revise after the GRPC API udpate.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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>
|
|
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
```
|
|
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>
|
|
For code readability, this commit make some arguments
to receivers.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
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>
|
|
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>
|
|
Notable change: extended community formatting.
# YaBGP BGP EVPN extended communities:
mac-mobility
esi-label
es-import
router-mac
|
|
|
|
|
|
This patch adds a new document explains Equal Cost Multipath routes with
Zebra integration.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|