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
ISHIDA Wataru and FUJITA Tomonori
4193c36b06
api: stop using raw flag values and define grpc dedicated flags
...
make it easy to use grpc api
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 16:57:13 +09:00
ISHIDA Wataru and FUJITA Tomonori
a4f2e59028
policy: fix how to apply policy to follow openconfig description
...
OpenConfig model says for Route policy evaluation:
Evaluation of each policy definition proceeds by evaluating its
corresponding individual policy statements in order. When a
condition statement in a policy statement is satisfied, the
corresponding action statement is executed. If the action
statement has either accept-route or reject-route actions, policy
evaluation of the current policy definition stops, and no further
policy definitions in the chain are evaluated.
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 16:57:13 +09:00
Hiroshi Yokoi
5af15b1d9c
policy: remove debug log
2015-10-20 11:35:17 +09:00
ISHIDA Wataru and FUJITA Tomonori
f634b50357
api: support policy assignment modification via grpc
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
204eacc5c0
policy: name statement automatically when name is not given
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
9362bba919
api: support policy modification via grpc
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
95e68a8d88
api/cli: refactor api to retrieve policy
...
make it similar to other policy api
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
f834e42128
cli: support statement configuration
...
- create statement
$ gobgp policy statement add st01
- add community condition
$ gobgp policy statement st01 condition add community c1
- add route action
$ gobgp policy statement st01 action add accept
- add set-community action
$ gobgp policy statement st01 action add community 100:100
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
a88e0b5592
api: support statement modification via grpc
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
7cb50ce1cf
api/cli: add api to retrieve statements and support showing them via cli
...
$ gobgp policy statement
$ gobgp policy statement st0
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
16234ccbb3
cli: support defined-set configuration
...
prefix-set modification
gobgp policy prefix add p0 10.0.0.0/24 10..15
neighbor-set modification
gobgp policy neighbor add n0 10.0.0.1
as-path-set modification
gobgp policy aspath add a0 '^100_200_300$'
community-set modification
gobgp policy community add c0 100:100
ext-community-set modification
gobgp policy community add e0 rt:100:100
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
68635d8f06
api: support defined set modification via grpc
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
722975bfaf
policy: another cleanup
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
434aa169f4
policy: add constructor to create object from api structs
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
0ba93b0aa9
api: use two ints instead of string to represent mask-length-range
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
7937d8ddb6
policy: clean up
...
remove redundant api structures and shorten valiable names
re-implement *ToApiStruct functions as a method of each structures
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:10 +09:00
ISHIDA Wataru and FUJITA Tomonori
473f5b6ff3
table: fix to handle doReplace flag
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:09 +09:00
ISHIDA Wataru and FUJITA Tomonori
804126b0ac
table: remove unnecessary type casting
...
ASLen() is an interface method
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-20 10:33:09 +09:00
Hiroshi Yokoi and FUJITA Tomonori
748ad73b6f
policy: add 4byte AS mixed with 2byte AS test case
...
Signed-off-by: Hiroshi Yokoi <[email protected] >
2015-10-15 21:14:59 +09:00
Hiroshi Yokoi and FUJITA Tomonori
942fd7db8a
policy: add 4byte AS test
...
Signed-off-by: Hiroshi Yokoi <[email protected] >
2015-10-15 21:14:59 +09:00
ISHIDA Wataru and FUJITA Tomonori
352d8e2056
server: store import/export config in TabelManager instead of Peer
...
this is a preparation to apply policy to global rib.
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-09 20:18:09 +09:00
ISHIDA Wataru and FUJITA Tomonori
dd6140c6a2
table: merge policy package into table
2015-10-09 19:39:03 +09:00
FUJITA Tomonori
72c2e8ba39
server: fix soft reset out
...
soft reset out needs to use routes in the local table instead of the
adj-in. The export policy will be applied correctly.
Signed-off-by: FUJITA Tomonori <[email protected] >
2015-10-07 08:50:55 +09:00
ISHIDA Wataru
4b0830a5fe
policy: fix bug of export neighbor condition matching
...
export neighbor condition must match to the remote address of
destination peer.
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-07 00:53:37 +09:00
ISHIDA Wataru and FUJITA Tomonori
94836fe9a9
cli: add command to show accepted/rejected routes
...
$ gobgp neighbor <remote addr> accepted
$ gobgp neighbor <remote addr> rejected
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-02 03:30:29 +09:00
ISHIDA Wataru
4081c33b46
path: distinguish aspath set from aspath seq
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-10-01 11:23:39 +09:00
ISHIDA Wataru and FUJITA Tomonori
ca96672dc6
server/table: assign mpls labels to locally generated vpn routes
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-09-25 18:17:06 +09:00
ISHIDA Wataru
e986668fc8
api: rename package/service name to gobgpapi
...
api/Grpc is too general for package/service name.
rename them to gobgpapi/GobgpApi.
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-09-20 17:16:33 +09:00
ISHIDA Wataru and FUJITA Tomonori
e077c21fc2
table: fix bug of updating cluster-list path attribute
...
we must clone whole path attribute when updating path attributes.
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-09-16 22:28:00 +09:00
ISHIDA Wataru and FUJITA Tomonori
d026fabfea
table: use explicitly specified nexthop for iBGP if exists
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-09-16 13:54:11 +09:00
ISHIDA Wataru
ba3a7ddb02
table: add string method for easier debugging
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-09-10 13:58:26 +09:00
ISHIDA Wataru
9298e5eeca
*: kill bgp.NLRInfo and bgp.WithdrawnRoute
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2015-09-08 13:13:34 +09:00