ISHIDA Wataru
21b7301e04
server: fix soft-reset-in to handle in-policy change properly
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-02-01 23:11:12 +09:00
ISHIDA Wataru and FUJITA Tomonori
d94f5d2c03
config: add openconfig identity structs in bgp_configs.go
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-25 04:57:11 -08:00
FUJITA Tomonori
7a5cf6a2b9
rpki: add rpki validate API
...
$ gobgp rpki validate
validates all the paths in the table with the current ROAs.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-01-17 07:46:35 -08:00
FUJITA Tomonori
f4c4099418
update rpki monitor API
...
- handle withdraw
- added some new info (peer address, timestamp, aspath attribute)
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-01-17 06:21:23 -08:00
FUJITA Tomonori
1e564f2d30
table: fix NewBitmap's size calculation
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-01-17 06:01:49 -08:00
ISHIDA Wataru
6403c80663
server: reduce number of path.Clone() call to reduce memory footprint
...
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 <[email protected] >
2016-01-16 18:25:35 +09:00
ISHIDA Wataru
0cf8045e99
policy: introduce policy option infra
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-16 18:25:18 +09:00
ISHIDA Wataru
40ce51137a
table: remove unnecessary copy of path attributes
...
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 <[email protected] >
2016-01-16 18:22:13 +09:00
ISHIDA Wataru
b344eb3777
table: kill unused field medSetByTargetNeighbor
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-16 16:25:24 +09:00
ISHIDA Wataru
427c665579
policy: support an action to add origin-validation ext-community
...
you can implement
https://tools.ietf.org/html/draft-kklf-sidr-route-server-rpki-light-00
by following commands
$ gobgp policy statement st0 add condition rpki valid
$ gobgp policy statement st0 add action ext-community add valid
$ gobgp policy statement st1 add condition rpki not-found
$ gobgp policy statement st1 add action ext-community add not-found
$ gobgp policy statement st2 add condition rpki invalid
$ gobgp policy statement st2 add action ext-community add invalid
$ gobgp policy p0 add st0 st1 st2
$ gobgp policy p0
Name p0:
StatementName st0:
Conditions:
RPKI result: valid
Actions:
ExtCommunity: COMMUNITY_ADD[valid]
NONE
StatementName st1:
Conditions:
RPKI result: not-found
Actions:
ExtCommunity: COMMUNITY_ADD[not-found]
NONE
StatementName st2:
Conditions:
RPKI result: invalid
Actions:
ExtCommunity: COMMUNITY_ADD[invalid]
NONE
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-10 20:03:27 +09:00
ISHIDA Wataru
127e81dc75
policy: fix NewRpkiValidationConditionFromApiStruct()
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-10 20:03:23 +09:00
ISHIDA Wataru and FUJITA Tomonori
cc8d0fd748
config: refactor config structure
...
- change config variable name to chaincase from camelcase
- remove unnecessary wrapper structs which only contain one slice field
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-09 05:17:57 -08:00
ISHIDA Wataru and FUJITA Tomonori
3bed393b01
config: add FromInt() method to config typedef
...
use for the translation between api structs
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-09 05:17:57 -08:00
ISHIDA Wataru and FUJITA Tomonori
b0fbcc6b1b
config: change enum value type to string for ease of configuration
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-09 05:17:57 -08:00
ISHIDA Wataru and FUJITA Tomonori
26c03bb779
tools: avoid adding a new option to bgpyang2golang.py and fix gobgp.yang
...
pyang has an internal flag "multiple_modules" to handle multiple yang modules.
use it instead of introducing a new option --augment
also, fix warnings and errors in gobgp.yang which were there but not has been
detected for a while due to the usage of --augment.
by using "multiple_modules" flag, pyang detected them.
most notable error is wrong usage of list, which needs a key in its
substatement.
this patch adds key to some of them, and for others uses leaf-list
instead.
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-09 05:17:57 -08:00
ISHIDA Wataru
f42b8fbae6
table: copy path-attr list before converting to as2 path
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-09 15:29:01 +09:00
ISHIDA Wataru
093ea72359
policy: remove heavy debug msg
...
Sprintf() to stringify Fields is heavy
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-01-06 14:53:42 +09:00
ISHIDA Wataru
d01c1586b9
config: use viper and support multiple configuration formats
...
// toml by default
$ gobgpd -f gobgpd.toml
// use -t to change configuration type
$ gobgpd -t yaml -f gobgpd.yaml
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-12-29 14:47:06 +09:00
ISHIDA Wataru
58946b7924
config: make config/state variable name simple
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-12-28 21:02:03 +09:00
FUJITA Tomonori
7a2b395116
add MOD_PATH API
...
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 <[email protected] >
2015-12-26 19:24:46 -08:00
ISHIDA Wataru and FUJITA Tomonori
fdaa6da2cd
table: fix UpdatePathAttrs2ByteAs and UpdatePathAttrs4ByteAs
2015-12-25 20:20:13 -08:00
ISHIDA Wataru and FUJITA Tomonori
3184c7691c
policy: fix insufficient nil check
...
RouteAction is interface. we have to check the contained value is also
nil.
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-12-24 15:43:40 -08:00
FUJITA Tomonori
a37e4eac6c
table: fix the number of accepted
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-12-22 16:08:43 +09:00
FUJITA Tomonori
f892946298
bmp: fix post-policy bmp message creation
...
post-policy code creates paths from bgp update and then create the
message from the modified paths. MP_UNREACH needs to be handled
diffently.
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-12-17 21:49:32 -08:00
FUJITA Tomonori
1ac95d5869
table: always try to merge NLRIs to one message
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-12-16 07:56:47 -08:00
ISHIDA Wataru
d6148c75a3
api: refactor afisafi api
...
remove unused fields
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-12-15 18:26:32 +09:00
FUJITA Tomonori
c806da563e
table: remove useless table owner member
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-12-08 16:19:38 -08:00
FUJITA Tomonori
62373821c5
table: remove unused DeletePathsforPeer()
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-12-08 14:45:37 +09:00
ISHIDA Wataru and FUJITA Tomonori
a719a3de6e
server/table: use only one rib for multiple route server clients
...
speed up and reduce memory footprint
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-12-08 14:45:37 +09:00
ISHIDA Wataru and FUJITA Tomonori
a36c84c510
make adj-rib implementation more clear and efficient
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-12-02 16:02:21 +09:00
FUJITA Tomonori
b83d3cc802
table: improve implicitWithdraw()
...
remove one loop.
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-12-02 12:53:01 +09:00
ISHIDA Wataru and FUJITA Tomonori
093945ee30
table: sort all known paths instead of just selecting best
...
this is a preparation for add-path recv/send feature
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-12-02 09:53:38 +09:00
FUJITA Tomonori
f6897fd47f
rpki: fix IPv4-mapped addresss handling
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-11-18 21:07:45 -08:00
FUJITA Tomonori
59f18c15ca
use the same timestamp for bmp and mrt updates
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-11-13 10:50:26 +09:00
ISHIDA Wataru and FUJITA Tomonori
d5d99dad68
table: fix how to mark a path as best in ToApiStruct()
...
When two peers advertise exactly same path, one will be marked as best, and
another will not. In this case, in ToApiStruct(), we mustn't mark a path
as best by Equal() method since Equal() compare path's content, not identity.
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-11-12 12:49:12 +09:00
FUJITA Tomonori
efcbc131df
server: move peerInfo from peer to fsm
...
fsm needs it with the later commit.
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-11-09 05:32:38 -08:00
ISHIDA Wataru and FUJITA Tomonori
d53a5d11d9
table: fix local-pref handling for external peer
...
remove a local-pref path attribute when peer is external and
not a confederation member.
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-11-08 05:05:36 -08:00
ISHIDA Wataru and FUJITA Tomonori
2db916a4d3
table: use a local configured med/local-pref path-attr if exists
...
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 <[email protected] >
2015-11-08 05:05:36 -08:00
FUJITA Tomonori
d6360e2b32
server: fix RPKI verification to handle ASPATH ATTR TYPE properly
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-10-27 23:10:55 +09:00
FUJITA Tomonori
c66b596122
server: fix radix key bug in rpki test
...
also clean up functions to create a radix key.
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-10-27 09:34:32 +09:00
ISHIDA Wataru
9c01b2682b
policy: use radix-tree for prefix-list matching
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-24 21:52:11 +09:00
ISHIDA Wataru
bb881467bc
policy: modify path.GetAsSeqList() to insert 0 for non-seq-as-elems
...
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 <[email protected] >
2015-10-24 21:51:54 +09:00
ISHIDA Wataru
1aa345882e
policy: speed up as-path matching
...
when matching with single as-path, stop using regexp for speed up
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-24 21:51:54 +09:00
Hiroshi Yokoi
087c1871c8
policy: add missing arg
...
Signed-off-by: Hiroshi Yokoi <[email protected] >
2015-10-21 11:45:45 +09:00
Hiroshi Yokoi
3462023cf0
policy: add field keys
...
Signed-off-by: Hiroshi Yokoi <[email protected] >
2015-10-21 11:41:40 +09:00
FUJITA Tomonori
0e64f7c080
server: remove peer's getBests method
...
Use TableManager's getBestPathList
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-10-21 10:10:17 +09:00
FUJITA Tomonori
a1a86cd212
table: make AdjRib API take slice of RouteFamily
...
Make the code simpler
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-10-21 09:50:39 +09:00
FUJITA Tomonori
bbc852d613
table: store the list of route family in TableManager
...
Will be used later to avoid generate the list of route family every
time.
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-10-21 05:50:54 +09:00
ISHIDA Wataru and FUJITA Tomonori
ff1312613f
policy: name statement automatically also via grpc
...
fix an incomplete commit 204eacc5c0
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 16:57:13 +09:00
ISHIDA Wataru and FUJITA Tomonori
52c73c394a
policy: avoid null pointer dereference
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 16:57:13 +09:00