Age | Commit message (Collapse) | Author |
|
When neighbor had AddPath capability, then disable AddPath after that. Old marshallingOptions remains. So once neighbor enabled AddPath it can't be disabled with no AddPath capability option in Open Message.
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
The serialization of ipv4/v6 nlri should be goroutine-safe but somehow not.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
needs to find a diffrent ESI with the same mac address.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
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>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
"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>
|
|
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>
|
|
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>
|
|
The current type is string, which size is multiple of byte(=uint8).
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
We don't need nanosecond precision. shrinks from 96 to 80 bytes.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
shrinks from 112 to 96 bytes.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
"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>
|
|
|
|
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>
|