Age | Commit message (Collapse) | Author |
|
Shrink memory usage.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
https://github.com/osrg/gobgp/issues/1249
The IN policy was removed. The modification by the IMPORT policy are
visible to all route server peers.
This saves some dozens bytes memory per a path.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
This patch adds getter functions for the segment type and AS list of
each segment without using type assertion.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
The length value can be retrieved from the route type specific data
field and need not to be specified at the initialization.
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 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>
|
|
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>
|
|
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>
|
|
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, "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>
|
|
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>
|
|
For readability and maintainability, separate ShowRoute()
into some small functions.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Currently, we sort the FlowSpec rules when creating a new path
containing the FlowSpec NLRI and when parsing CLI arguments for
the FlowSpec rules.
This patch moves sorting the rules into the inside of the "packet"
module and sorts them when decoding binary and creating new NLRI.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
V4 NLRI needs more 4 bytes with addpath enabled.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This is for batching paths into one bgp message.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
- withdraw path doesn't need any attributes.
- mp reach path doesn't need mp unreach attribute (some bgp speackers
send an update message including both mp reach and mp unreach).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
EoR should be sent at the end of the UPDATE messages,
but currently, EoR may be sent before RIB.
This commit fixes this problem.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
This patch removes debug print statements for improving the result of
the spell checker.
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>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
It is possible that gobgp's v4 path structure contains mpreach or
mpunreach attribute. (we store entire path attributes in path structure as
they are received)
Since we use a NLRI field of BGP update message for v4 updates and don't
aggregate update/withdrawal messages for other address families, we need
to exclude these attribute before sending out v4 updates.
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
some implementations send a mpunreach attribute piggy backed on an
update message. Since it is stored in pathattrs of gobgp's path structure,
we need to exclude it before sending out update messages.
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
allocating 256 bytes per prefix isn't a good idea. Let's allocate 8
bytes by default and expand dynamically if necessary.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
With addpath support, two paths from API without AS_PATH attribute
could be compared.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
A certain bgp implementation crushes when receiving them.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
The local identifier for path is sent to remote peers.
To simplify the implementation,
1) the local identifier is unique per prefix not peer.
2) always assign the local identifier even without addpath-rx-capable peer.
In the future, we might need to improve 2) to avoid the unnecessary
overhead.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
$ gobgp neighbor <neighbor address>
ID Network Next Hop AS_PATH Age Attrs
2 10.0.0.10/32 10.10.1.2 01:05:35 [{Origin: i} {LocalPref: 100}]
1 10.0.0.10/32 10.10.1.1 01:05:35 [{Origin: i} {LocalPref: 100}]
3 10.1.0.10/32 10.10.1.3 01:05:35 [{Origin: i} {LocalPref: 100}]
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
With Destination struct, multiple Paths can be moved from the table
package to the server package in a cleaner way; for features such as
add-path.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
By introducing dynamic neighbor feature,
GoBGP can have dynamic neighbors,
and corresponding Config.NeighboAddress can be empty.
This patch sets State.NeighborAddress for all neighbors,
and gets the neighbor's address from them.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
The usage of "github.com/sirupsen/logrus" is recommended.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
In NewDestination we add additional path to AddrToRadixkey to check
the concrete type of nlri.
|