summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
AgeCommit message (Collapse)Author
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>
2016-02-27ops: fix and integration the attribute name that indicates the route ↵Naoto Hanaue
received from an external resource
2016-02-25table: sort path attributesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-24cli: sort Flowspec componentsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-24table: sort Flowspec componentsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-19ops: maintenance of two-way route exchangeNaoto Hanaue
2016-02-12table: fix gracefull restart regressionFUJITA Tomonori
eor path needs a filter map. Otherwise gobgpd crashes. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-10server: support graceful-restart helper-speaker behaviorISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-10table: support sending/receiving EOR msgISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-07table: add source-asn and source-id to api structISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-02-01server: fix soft-reset-in to handle in-policy change properlyISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-17table: fix NewBitmap's size calculationFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-16server: reduce number of path.Clone() call to reduce memory footprintISHIDA Wataru
the result of memory profile (500 route-server-clients each of them advertises 100 routes) before: (pprof) top5 3913.02MB of 3978.69MB total (98.35%) Dropped 148 nodes (cum <= 19.89MB) Showing top 10 nodes out of 11 (cum >= 21MB) flat flat% sum% cum cum% 2970.30MB 74.66% 74.66% 2975.80MB 74.79% github.com/osrg/gobgp/server.filterpath 810.09MB 20.36% 95.02% 810.59MB 20.37% github.com/osrg/gobgp/table.(*AdjRib).Update 115.60MB 2.91% 97.92% 119.10MB 2.99% github.com/osrg/gobgp/table.createUpdateMsgFromPath 10MB 0.25% 98.17% 1878.02MB 47.20% github.com/osrg/gobgp/server.(*BgpServer).propagateUpdate 4.50MB 0.11% 98.29% 144.60MB 3.63% github.com/osrg/gobgp/table.CreateUpdateMsgFromPaths after: (pprof) top5 1259.49MB of 1284.27MB total (98.07%) Dropped 175 nodes (cum <= 6.42MB) Showing top 10 nodes out of 26 (cum >= 36.51MB) flat flat% sum% cum cum% 975.81MB 75.98% 75.98% 976.31MB 76.02% github.com/osrg/gobgp/table.(*AdjRib).Update 198.67MB 15.47% 91.45% 208.17MB 16.21% github.com/osrg/gobgp/table.createUpdateMsgFromPath 22MB 1.71% 93.16% 22MB 1.71% github.com/osrg/gobgp/packet.(*IPAddrPrefix).Serialize 20MB 1.56% 94.72% 707.19MB 55.07% github.com/osrg/gobgp/server.(*BgpServer).propagateUpdate 13.50MB 1.05% 95.77% 13.50MB 1.05% github.com/osrg/gobgp/table.NewPath Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-16table: remove unnecessary copy of path attributesISHIDA Wataru
the result of memory profile (500 route-server-clients each of them advertises 100 routes) before: (pprof) top5 9330.48MB of 9367.53MB total (99.60%) Dropped 157 nodes (cum <= 46.84MB) Showing top 10 nodes out of 17 (cum >= 9334.17MB) flat flat% sum% cum cum% 6163.04MB 65.79% 65.79% 6163.04MB 65.79% github.com/osrg/gobgp/table.NewPath 1155.05MB 12.33% 78.12% 7302.59MB 77.96% github.com/osrg/gobgp/table.(*Path).Clone 986.31MB 10.53% 88.65% 1388.81MB 14.83% github.com/osrg/gobgp/table.(*AdjRib).Update 402.51MB 4.30% 92.95% 402.51MB 4.30% fmt.Sprintf 402.51MB 4.30% 97.24% 402.51MB 4.30% net.parseIPv4 after: (pprof) top 3913.02MB of 3978.69MB total (98.35%) Dropped 148 nodes (cum <= 19.89MB) Showing top 10 nodes out of 11 (cum >= 21MB) flat flat% sum% cum cum% 2970.30MB 74.66% 74.66% 2975.80MB 74.79% github.com/osrg/gobgp/server.filterpath 810.09MB 20.36% 95.02% 810.59MB 20.37% github.com/osrg/gobgp/table.(*AdjRib).Update 115.60MB 2.91% 97.92% 119.10MB 2.99% github.com/osrg/gobgp/table.createUpdateMsgFromPath 10MB 0.25% 98.17% 1878.02MB 47.20% github.com/osrg/gobgp/server.(*BgpServer).propagateUpdate 4.50MB 0.11% 98.29% 144.60MB 3.63% github.com/osrg/gobgp/table.CreateUpdateMsgFromPaths Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-16table: kill unused field medSetByTargetNeighborISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-09config: change enum value type to string for ease of configurationISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-29config: use viper and support multiple configuration formatsISHIDA Wataru
// toml by default $ gobgpd -f gobgpd.toml // use -t to change configuration type $ gobgpd -t yaml -f gobgpd.yaml Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-28config: make config/state variable name simpleISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-26add MOD_PATH APIFUJITA Tomonori
Handle only one route unlike MOD_PATHS API. When the API returns an uuid when a route is created. The uuid can be used to remove the route later. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-15api: refactor afisafi apiISHIDA Wataru
remove unused fields Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-08server/table: use only one rib for multiple route server clientsISHIDA Wataru
speed up and reduce memory footprint Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-02table: sort all known paths instead of just selecting bestISHIDA Wataru
this is a preparation for add-path recv/send feature Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-08table: fix local-pref handling for external peerISHIDA Wataru
remove a local-pref path attribute when peer is external and not a confederation member. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-08table: use a local configured med/local-pref path-attr if existsISHIDA Wataru
If a path is generated locally and it has a med/local-pref path attribute, don't remove or alter that. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-27server: fix RPKI verification to handle ASPATH ATTR TYPE properlyFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-24policy: modify path.GetAsSeqList() to insert 0 for non-seq-as-elemsISHIDA Wataru
GetAsSeqList() is used for AsPathSet matching and AsPathPrepend action. Just eliminating non-seq-as-elems from what GetAsSeqList() returns cause wrong results for these two match/action. e.g path A's as-path: {100, 200} 300 currently, action 'as-path-prepend left-most repeat 2' will alter as-path to 300 300 {100, 200} 300, which is not expected behavior. To fix this, insert 0 for non-seq-as-elems. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-10-20policy: clean upISHIDA Wataru
remove redundant api structures and shorten valiable names re-implement *ToApiStruct functions as a method of each structures Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>