summaryrefslogtreecommitdiffhomepage
path: root/table
AgeCommit message (Collapse)Author
2018-05-24fix withdraw with addpath and rtc enabledFUJITA Tomonori
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>
2018-05-23zclient: Avoid flapping of nexthop reachabilityIWASE Yusuke
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>
2018-05-23fix: missing validateCondition in ReplaceStatementlnever
2018-05-11fix add-path with vrf-neighborFUJITA Tomonori
close #1661 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-10make Path objects in rib read-onlyFUJITA Tomonori
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>
2018-05-07table: use shorter key for map of ipv4 and ipv6 prefixesFUJITA Tomonori
save about 100MB memory. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-07table: remove Radixkey member in Destination structureFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-07table: remove key member in Path structureFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-07table: remove uuid member in originInfo structureFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-07table: remove VrfIds member in Path structureFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-07avoid updating Path in the rib via MarkStale()FUJITA Tomonori
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>
2018-05-07table: remove withdraw/newPath/oldPath Lists in DestinationFUJITA Tomonori
Shrink memory usage. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-07preparation for shrinking Destination structureFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-07use sorted single master table for route server setupFUJITA Tomonori
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>
2018-04-25Restore PathIdentifier for paths belonging to VRFsDavid Barroso
2018-04-03packet/bgp: Getter functions for AS segmentIWASE Yusuke
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>
2018-04-03packet/bgp: Remove length argument from NewEVPNNLRIIWASE Yusuke
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>
2018-02-21table: fix handleMacMobility()FUJITA Tomonori
needs to find a diffrent ESI with the same mac address. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-16table/path: Originator ID for locally generated pathsIWASE Yusuke
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>
2018-02-13packet/bgp: Remove raw binary field on PathAttributeIWASE Yusuke
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>
2018-02-08config: Option to disable best path selectionIWASE Yusuke
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>
2018-02-06table: Change type of BestPathReason to uint8IWASE Yusuke
The current type is string, which size is multiple of byte(=uint8). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-02-06table: replace time.Time struct with int64 in originInfo structFUJITA Tomonori
We don't need nanosecond precision. shrinks from 96 to 80 bytes. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-06table: change originInfo struct layout to reduce the sizeFUJITA Tomonori
shrinks from 112 to 96 bytes. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
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>
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-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-11-26cmd/neighbor: Refactor ShowRoute()Satoshi Fujimoto
For readability and maintainability, separate ShowRoute() into some small functions. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-24packet/bgp: Sort FlowSpec rules when decoding/creatingIWASE Yusuke
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>
2017-11-23table: fix merging of v4 paths with addpath enabledFUJITA Tomonori
V4 NLRI needs more 4 bytes with addpath enabled. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-23table: use Path's hash value for mergingFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-23table: add attribute hash value to Path structureFUJITA Tomonori
This is for batching paths into one bgp message. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-23table: avoid unnecessary attributes in Path objectFUJITA Tomonori
- 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>
2017-11-07table/path: Print Confederation AS_PATH segment ExplicitlySatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07*: Support BGP Confederations (RFC 5065)Satoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-03table/policy: Nil check before reference in inUse()Satoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-03table/message: Send EoR as the last of UPDATE messagesSatoshi Fujimoto
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>
2017-11-01table/path_test: Remove debug printIWASE Yusuke
This patch removes debug print statements for improving the result of the spell checker. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-01Fix some typos found by spell checkerIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-01Fix some spelling for spell checker's testIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-10-30table/path: net.IP.IsUnspecified() instead of isZero()IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-10-03table: Implement ignore-as-path-lengthIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-14table/policy: fix ReplacePolicy with preserve=false to remove old statementsPiotr Wydrych
2017-08-07table: exclude mpreach and mpunreach attribute for normal v4 updatesWataru Ishida
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>
2017-08-07table: fix handling of update with both mpunreach and mpreach attributeWataru Ishida
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>
2017-08-02table: allocate bitmap for path id dynamicallyFUJITA Tomonori
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>
2017-07-27table: disable wrong warning about aspathFUJITA Tomonori
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>
2017-07-26table: don't send OriginaterID or ClusterList attributes to non rr clientsFUJITA Tomonori
A certain bgp implementation crushes when receiving them. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>