Age | Commit message (Collapse) | Author |
|
https://github.com/golang-standards/project-layout
Now you can see clearly what are private and public library code.
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: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
This is a part of work removing table/ usage in api/. api/ will depend
on only protobuf stuff and packet/.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
|
|
This reduces the table.Path size from 88 to 72 which adds up considerably
since it is the most allocated persistent object.
|
|
CreateUpdateMsgFromPaths() assumes that a path has a proper hash
value. If a path doesn't, the function takes too long.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
It is possible for a call from other Table methods for an interface that does
not match the tables route family to reach the type assertion and panic. This
change better reflects the intention of the code by checking the concrete type
using a type switch instead.
|
|
Currently, only IPv4 address is acceptable for the CLUSTER_ID setting,
this patch enables to specify the CLUSTER_ID as a 32-bit unsigned
integer.
With this expansion, "Config.RouteReflectorClusterId" stores the raw
configured value for the CLUSTER_ID and "State.RouteReflectorClusterId"
stores the value used for construct the CLUSTER_LIST attribute.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
update accepted number in adj-in rib after AllowOwnAs has changed.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
fix accepted number in adj-in rib when it has an as-looped path.
adding another member to Path struct is pain. Should be fixed later.
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>
|
|
Needs withdrawn paths that includes attributes. The attributes are
necessary because they are used with rtc table to check if the paths
were sent.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Currently, GoBGP sends the ROUTE_DELETE messages to Zebra for the paths
whose nexthop was determined as unreachable by IGP, but when Zebra
received the ROUTE_DELETE messages for the unreachable nexthop, Zebra
will send the NEXTHOP_UPDATE message with the given nexthop is
reachable via the default interface. This message unexpectedly causes
updates of the unreachable path to be reachable (not true though). Then
GoBGP will send ROUTE_ADD messages to Zebra, but those paths soon will
be invalidated via the NEXTHOP_UPDATE message, GoBGP will send the
ROUTE_DELETE messages and ... (infinite loop).
This patch fixes to avoid sending the ROUTE_DELETE messages for the
unreachable paths because those paths are inactivated on Zebra and not
installed to FIB.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
close #1661
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Now you can read Path objects in rib safely. Nobody modifies
them. GetRib() API doesn't need to clone the objects. With full
routes, this avoid allocating temporary huge memory.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
save about 100MB memory.
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>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
A path object in the adj-in is also in the master rib. We can't update
such.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
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>
|