summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
AgeCommit message (Collapse)Author
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-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: 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-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-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-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-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>
2017-07-26table: assign local identifier to pathFUJITA Tomonori
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>
2017-07-19table: Include detailed information about RPKI in originInfoSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-07-04api/cli: support showing path-identifierWataru Ishida
$ 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>
2017-06-16config: Use State to get NeighborAddress instead of ConfigSatoshi Fujimoto
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>
2017-06-07replace github.com/Sirupsen/logrus with github.com/sirupsen/logrusFUJITA Tomonori
The usage of "github.com/sirupsen/logrus" is recommended. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-01Fix RouteDistinguisher parsing and VPNV6 VRF rib parsingLamanna
2017-05-10*: support replace-peer-as (aka as-override)Wataru Ishida
we use the term replace-peer-as instead of as-override since openconfig is using it. cli ``` $ gobgp n add <neighbor-addr> as <asn> replace-peer-as ``` config ``` neighbor: config: peer-as: <asn> neighbor-address: <neighbor-addr> as-path-options: config: replace-peer-as: true ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-10*: support remove private asWataru Ishida
cli ``` $ gobgp n add <neighbor-addr> as <asn> remove-private-as (all|replace) ``` config ``` neighbor: config: peer-as: <asn> neighbor-address: <neighbor-addr> remove-private-as: all ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-10table: Advertise local-pref set by import policyTatsushi Demachi
At importing a path from an external peer, LOCAL_PREF can be set by an import policy but at exporting a best path to an internal peer, this learned, calculated LOCAL_PREF is never used and every time overwritten by a default value 100. According to RFC 4271 "5.1.5. LOCAL_PREF" and "9.1.1. Phase 1: Calculation of Degree of Preference", the learned value should be advertised to other internal peers. This fixes it by just removing resetting a non-local path's LOCAL_PREF by the default value.
2017-04-27server: avoid unnecessary path clone with route serverFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-04-04skip asn negotiation for BGP unnumbered peersISHIDA Wataru
since BGP unnumbered peers are typically trusted, skip asn negotiation for easy configuration. from configuration file: ```toml [[neighbors]] [[neighbors.config]] neighbor-interface = "eth0" ``` from cli: ``` $ gobgp neighbor add interface eth0 ``` Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-04-04table: handle paths with IPv4 NLRI and IPv6 nexthop properlyISHIDA Wataru
when a path has IPv4 NLRI and IPv6 nexthop, handle it in MPBGP manner. (use mp-reach-nlri path attribute instead of nexthop path attibute) Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-04-04table: fix bug of UpdatePathAttrs() with ipv6 link-local peerISHIDA Wataru
config.Neighbor.Transport.State.LocalAddress may have zone info and not be valid ip address format. Use PeerInfo.LocalAddress instead. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-03-06table/path: Enable to stringify nexthop reachabilityIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-06table: Evaluate best path based on nexthop reachabilityIWASE Yusuke
For BGP Nexthop Tracking, this patch enables table package to evaluate the best path based on the nexthop reachability which validated by IGB. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-01-22api: add a UUID field to Path structureWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-04support neighbor belongs to VRFWataru Ishida
$ gobgp vrf add red rd 100:100 rt both 100:100 $ gobgp neighbor add 10.0.0.1 as 2 vrf red $ gobgp vrf red neighbor Peer AS Up/Down State |#Advertised Received Accepted 10.0.0.1 2 never Active | 0 0 0 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-10policy: support large-community match/actionWataru Ishida
close #1133 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-09*: support long lived graceful restartWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-09-30server: add vrf support to bestpath watchFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-16server/table: don't modify/delete path attributes for route server clientWataru Ishida
RFC7947 2.2 says Optional recognized and unrecognized BGP attributes, whether transitive or non-transitive, SHOULD NOT be updated by the route server (unless enforced by local IXP operator configuration) and SHOULD be passed on to other route server clients Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-08-25api/cli: kill cmd package custom path/destination structsWataru Ishida
reuse table package Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-08-21fixed some misspell errorPeng Xiao
Signed-off-by: Peng Xiao <xiaoquwl@gmail.com>
2016-07-21move gRPC-related code for REQ_ADD_PATH and REQ_DELETE_PATH to grpc_server.goFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-07-20move gRPC-related code in path.go and destination.go to grpc_server.goFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-13drop unknown optional non-transitive attributesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-06server/table: support bgp multipathISHIDA Wataru
This patch adds multiPathList field to watcherEventBestPathMsg and fills it when global.use-multiple-paths.config.enable = true Following patches add support injecting multipath to zebra and monitoring it via gRPC Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-06table: return default value(100) when local-pref attr doesn't existISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-29table: fix to compare new best path with old best pathFUJITA Tomonori
The current code uses Path.Equal(), which just check out if pathes are idential. However, it doesn't work for two cloned pathes of a path (soft update in case). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-25policy: add local-pref actionISHIDA Wataru
$ gobgp policy statement st01 add action local-pref 110 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23add collector featureFUJITA Tomonori
dump the update messages and the state change of peers into influxdb: [collector.config] url = "http://localhost:8086" db-name = "gobgp" Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-23table: fix UpdatePathAttrs() to obey RFC4684ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-27server: fix not to modify Transport.ConfigISHIDA Wataru
modify Transport.State instead Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-20path: improve Path.String()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-03-31move packet/*.go to packet/bgp/*.go for Go's conventionFUJITA Tomonori
Later, we move non-bgp protocol stuff like mrt under their own direcotries. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-15table: support advertising local route with specified nexthop via eBGPISHIDA Wataru
we support this for iBGP. why not for eBGP. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-03-02table: use raw data for age instead of durationFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-02api: add neighbor-ip field to grpc Path messageISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-29cli: delete duplicated codeFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-29config/server: support per-peer asnISHIDA Wataru
you can override `global.config.as` by `neighbor.config.local-as` Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>